Merge lp:~michael.nelson/ubuntu-webcatalog/1169225-long-names into lp:ubuntu-webcatalog

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: 179
Merged at revision: 180
Proposed branch: lp:~michael.nelson/ubuntu-webcatalog/1169225-long-names
Merge into: lp:ubuntu-webcatalog
Diff against target: 16 lines (+0/-6)
1 file modified
src/webcatalog/auth.py (+0/-6)
To merge this branch: bzr merge lp:~michael.nelson/ubuntu-webcatalog/1169225-long-names
Reviewer Review Type Date Requested Status
Martin Albisetti (community) Approve
Review via email: mp+159137@code.launchpad.net

Commit message

Don't save displayname.

Description of the change

Don't save first/last name.

We're getting hundreds of oopses per day (see linked bug) due to authenticated requests to the oneconf api when we try to save the display names of the authenticating user.

We don't use the information anywhere in the codebase. We could update the db columns (as we did with sca), but as its django.contrib.auth, not an app of our own, I'd personally prefer to do that only if we were using the data.

Another option I'd be ok with is simply truncating the first and last names to the max length before saving. Happy to update to that if you prefer.

`fab test`

To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/webcatalog/auth.py'
2--- src/webcatalog/auth.py 2012-06-30 00:09:12 +0000
3+++ src/webcatalog/auth.py 2013-04-16 12:07:29 +0000
4@@ -121,12 +121,6 @@
5 password=None)
6 user.useropenid_set.create(claimed_id=claimed_id)
7
8- displayname = pieces['displayname']
9- if displayname != user.get_full_name():
10- user.first_name, sep, user.last_name = displayname.rpartition(
11- ' ')
12- user.save()
13-
14 consumer, created = Consumer.objects.get_or_create(
15 user=user, key=consumer_key, secret=pieces['consumer_secret'])
16 token, created = Token.objects.get_or_create(

Subscribers

People subscribed via source and target branches