Clean Up New Login Confirmation User Agent Strings

Bug #1648569 reported by Nat Katin-Borland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL4
Fix Released
Medium
Carlos de la Guardia

Bug Description

As discussed on today's check-in call with Oleg, let's try to clean up the user agent strings in the New Login confirmation emails because the full agent strings have been confusing staff, especially with how IE shows up as Mozilla.

Oleg shared an example from DropBox (attached). He also pointed to a website http://www.useragentstring.com in case that's helpful.

Please see if there is Python library that we can use to pull in clearer user agent identifications that are less confusing to the end user.

Thanks,

Revision history for this message
Nat Katin-Borland (nborland) wrote :
Changed in karl4:
importance: Undecided → Medium
assignee: nobody → Carlos de la Guardia (cguardia)
milestone: none → 026
Revision history for this message
Carlos de la Guardia (cguardia) wrote :

I think we could use this one:

https://pypi.python.org/pypi/user-agents/1.0.1

Could you add it to the eggs?

Changed in karl4:
status: New → In Progress
Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 1648569] Clean Up New Login Confirmation User Agent Strings

I’m looking for a Python project that seems active. This hasn’t had a release since Aug 2015, has 24 open tickets, and not too many commits in the last year. However, take a look at the implementation and see if you think you can monkey-patch it if needed.

—Paul

> On Dec 9, 2016, at 12:20 PM, Carlos de la Guardia <email address hidden> wrote:
>
> I think we could use this one:
>
> https://pypi.python.org/pypi/user-agents/1.0.1
>
> Could you add it to the eggs?
>
> ** Changed in: karl4
> Status: New => In Progress
>
> --
> You received this bug notification because you are subscribed to KARL4.
> Matching subscriptions: KARL4
> https://bugs.launchpad.net/bugs/1648569
>
> Title:
> Clean Up New Login Confirmation User Agent Strings
>
> Status in KARL4:
> In Progress
>
> Bug description:
> As discussed on today's check-in call with Oleg, let's try to clean up
> the user agent strings in the New Login confirmation emails because
> the full agent strings have been confusing staff, especially with how
> IE shows up as Mozilla.
>
> Oleg shared an example from DropBox (attached). He also pointed to a
> website http://www.useragentstring.com in case that's helpful.
>
> Please see if there is Python library that we can use to pull in
> clearer user agent identifications that are less confusing to the end
> user.
>
> Thanks,
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl4/+bug/1648569/+subscriptions

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Actually this doesn’t look too bad. The tickets are about obscure combinations of browsers as are the recent unreleased commits. I’ll add it today.

—Paul

> On Dec 11, 2016, at 10:07 AM, Paul Everitt <email address hidden> wrote:
>
> I’m looking for a Python project that seems active. This hasn’t had a
> release since Aug 2015, has 24 open tickets, and not too many commits in
> the last year. However, take a look at the implementation and see if you
> think you can monkey-patch it if needed.
>
> —Paul
>
>> On Dec 9, 2016, at 12:20 PM, Carlos de la Guardia <email address hidden> wrote:
>>
>> I think we could use this one:
>>
>> https://pypi.python.org/pypi/user-agents/1.0.1
>>
>> Could you add it to the eggs?
>>
>> ** Changed in: karl4
>> Status: New => In Progress
>>
>> --
>> You received this bug notification because you are subscribed to KARL4.
>> Matching subscriptions: KARL4
>> https://bugs.launchpad.net/bugs/1648569
>>
>> Title:
>> Clean Up New Login Confirmation User Agent Strings
>>
>> Status in KARL4:
>> In Progress
>>
>> Bug description:
>> As discussed on today's check-in call with Oleg, let's try to clean up
>> the user agent strings in the New Login confirmation emails because
>> the full agent strings have been confusing staff, especially with how
>> IE shows up as Mozilla.
>>
>> Oleg shared an example from DropBox (attached). He also pointed to a
>> website http://www.useragentstring.com in case that's helpful.
>>
>> Please see if there is Python library that we can use to pull in
>> clearer user agent identifications that are less confusing to the end
>> user.
>>
>> Thanks,
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/karl4/+bug/1648569/+subscriptions
>
> --
> You received this bug notification because you are subscribed to KARL4.
> Matching subscriptions: KARL4
> https://bugs.launchpad.net/bugs/1648569
>
> Title:
> Clean Up New Login Confirmation User Agent Strings
>
> Status in KARL4:
> In Progress
>
> Bug description:
> As discussed on today's check-in call with Oleg, let's try to clean up
> the user agent strings in the New Login confirmation emails because
> the full agent strings have been confusing staff, especially with how
> IE shows up as Mozilla.
>
> Oleg shared an example from DropBox (attached). He also pointed to a
> website http://www.useragentstring.com in case that's helpful.
>
> Please see if there is Python library that we can use to pull in
> clearer user agent identifications that are less confusing to the end
> user.
>
> Thanks,
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl4/+bug/1648569/+subscriptions

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

The user-agents package is now in our private repo.

—Paul

> On Dec 11, 2016, at 10:07 AM, Paul Everitt <email address hidden> wrote:
>
> I’m looking for a Python project that seems active. This hasn’t had a
> release since Aug 2015, has 24 open tickets, and not too many commits in
> the last year. However, take a look at the implementation and see if you
> think you can monkey-patch it if needed.
>
> —Paul
>
>> On Dec 9, 2016, at 12:20 PM, Carlos de la Guardia <email address hidden> wrote:
>>
>> I think we could use this one:
>>
>> https://pypi.python.org/pypi/user-agents/1.0.1
>>
>> Could you add it to the eggs?
>>
>> ** Changed in: karl4
>> Status: New => In Progress
>>
>> --
>> You received this bug notification because you are subscribed to KARL4.
>> Matching subscriptions: KARL4
>> https://bugs.launchpad.net/bugs/1648569
>>
>> Title:
>> Clean Up New Login Confirmation User Agent Strings
>>
>> Status in KARL4:
>> In Progress
>>
>> Bug description:
>> As discussed on today's check-in call with Oleg, let's try to clean up
>> the user agent strings in the New Login confirmation emails because
>> the full agent strings have been confusing staff, especially with how
>> IE shows up as Mozilla.
>>
>> Oleg shared an example from DropBox (attached). He also pointed to a
>> website http://www.useragentstring.com in case that's helpful.
>>
>> Please see if there is Python library that we can use to pull in
>> clearer user agent identifications that are less confusing to the end
>> user.
>>
>> Thanks,
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/karl4/+bug/1648569/+subscriptions
>
> --
> You received this bug notification because you are subscribed to KARL4.
> Matching subscriptions: KARL4
> https://bugs.launchpad.net/bugs/1648569
>
> Title:
> Clean Up New Login Confirmation User Agent Strings
>
> Status in KARL4:
> In Progress
>
> Bug description:
> As discussed on today's check-in call with Oleg, let's try to clean up
> the user agent strings in the New Login confirmation emails because
> the full agent strings have been confusing staff, especially with how
> IE shows up as Mozilla.
>
> Oleg shared an example from DropBox (attached). He also pointed to a
> website http://www.useragentstring.com in case that's helpful.
>
> Please see if there is Python library that we can use to pull in
> clearer user agent identifications that are less confusing to the end
> user.
>
> Thanks,
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl4/+bug/1648569/+subscriptions

Revision history for this message
Carlos de la Guardia (cguardia) wrote :

Turns out it requires this one too: https://pypi.python.org/pypi/ua-parser/0.7.2

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Our private PI makeindex.py script failed when adding this package. Over to Carlos.

—Paul

> On Dec 13, 2016, at 11:00 AM, Carlos de la Guardia <email address hidden> wrote:
>
> Turns out it requires this one too: https://pypi.python.org/pypi/ua-
> parser/0.7.2
>
> --
> You received this bug notification because you are subscribed to KARL4.
> Matching subscriptions: KARL4
> https://bugs.launchpad.net/bugs/1648569
>
> Title:
> Clean Up New Login Confirmation User Agent Strings
>
> Status in KARL4:
> In Progress
>
> Bug description:
> As discussed on today's check-in call with Oleg, let's try to clean up
> the user agent strings in the New Login confirmation emails because
> the full agent strings have been confusing staff, especially with how
> IE shows up as Mozilla.
>
> Oleg shared an example from DropBox (attached). He also pointed to a
> website http://www.useragentstring.com in case that's helpful.
>
> Please see if there is Python library that we can use to pull in
> clearer user agent identifications that are less confusing to the end
> user.
>
> Thanks,
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl4/+bug/1648569/+subscriptions

Revision history for this message
Carlos de la Guardia (cguardia) wrote :

Must have been just a hiccup, since it worked for me.

Revision history for this message
Carlos de la Guardia (cguardia) wrote :

Fixed.

Changed in karl4:
status: In Progress → Fix Committed
Revision history for this message
Paul Everitt (paul-agendaless) wrote :
Download full text (3.4 KiB)

I tried putting this on staging and got:

2016-12-22 17:01:39,913 ERROR [waitress][Dummy-2] Exception when serving /login.html
Traceback (most recent call last):
  File "/srv/karlstaging/staging/45/eggs/waitress-0.8.9-py2.7.egg/waitress/channel.py", line 337, in service
    task.service()
  File "/srv/karlstaging/staging/45/eggs/waitress-0.8.9-py2.7.egg/waitress/task.py", line 173, in service
    self.execute()
  File "/srv/karlstaging/staging/45/eggs/waitress-0.8.9-py2.7.egg/waitress/task.py", line 392, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/srv/karlstaging/staging/45/eggs/perfmetrics-2.0-py2.7.egg/perfmetrics/__init__.py", line 294, in app
    return nextapp(environ, start_response)
  File "/srv/karlstaging/staging/45/eggs/karl-4.23-py2.7.egg/karl/timeit.py", line 49, in __call__
    resp = req.get_response(self.app)
  File "/srv/karlstaging/staging/45/eggs/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/srv/karlstaging/staging/45/eggs/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/srv/karlstaging/staging/45/eggs/guillotine-0.1-py2.7.egg/guillotine/__init__.py", line 10, in __call__
    return self.app(environ, start_response)
  File "/srv/karlstaging/staging/45/eggs/repoze.vhm-0.13-py2.7.egg/repoze/vhm/middleware.py", line 106, in __call__
    return self.application(environ, start_response)
  File "/srv/karlstaging/staging/45/eggs/repoze.browserid-0.3-py2.7.egg/repoze/browserid/middleware.py", line 134, in __call__
    app_iter = self.app(environ, wrapper.wrap_start_response)
  File "/srv/karlstaging/staging/45/eggs/pyramid-1.2.1-py2.7.egg/pyramid/router.py", line 177, in __call__
    has_listeners and notify(NewResponse(request, response))
  File "/srv/karlstaging/staging/45/eggs/pyramid-1.2.1-py2.7.egg/pyramid/registry.py", line 61, in notify
    [ _ for _ in self.subscribers(events, None) ]
  File "/srv/karlstaging/staging/45/eggs/zope.component-3.6.0-py2.7.egg/zope/component/registry.py", line 315, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/srv/karlstaging/staging/45/eggs/zope.interface-3.8.0-py2.7-linux-i686.egg/zope/interface/adapter.py", line 583, in subscribers
    subscription(*objects)
  File "/srv/karlstaging/staging/45/eggs/karl-4.23-py2.7.egg/karl/subscribers.py", line 39, in request_logger
    user_agent = user_agents.parse(request.user_agent)
  File "/srv/karlstaging/staging/45/eggs/user_agents-1.0.1-py2.7.egg/user_agents/parsers.py", line 226, in parse
    return UserAgent(user_agent_string)
  File "/srv/karlstaging/staging/45/eggs/user_agents-1.0.1-py2.7.egg/user_agents/parsers.py", line 125, in __init__
    ua_dict = user_agent_parser.Parse(user_agent_string)
  File "/srv/karlstaging/staging/45/eggs/ua_parser-0.7.2-py2.7.egg/ua_parser/user_agent_parser.py", line 222, in Parse
    'user_agent': ParseUserAgent(user_agent_string, **jsParseBits),
  File "/srv/karlstaging/staging/45/eggs/ua_parser-0.7.2-py2.7.egg/ua_parser/user_agent_parser.py", line 249, in ParseUserAgent
    family, ...

Read more...

Changed in karl4:
status: Fix Committed → In Progress
Revision history for this message
Carlos de la Guardia (cguardia) wrote :

I think for some reason we got an empty user agent, which is a little strange. Added a safeguard for that.

Changed in karl4:
status: In Progress → Fix Committed
Changed in karl4:
status: Fix Committed → Fix Released
status: Fix Released → In Progress
status: In Progress → Fix Committed
Changed in karl4:
milestone: 026 → 027
Revision history for this message
Carlos de la Guardia (cguardia) wrote :

This was fixed a while ago, but apparently, I forgot to uncomment the line where the user agent was parsed in the login view. Done.

Changed in karl4:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.