Code

Opened 5 years ago

Closed 5 years ago

#11579 closed (duplicate)

Increase length of email field to accomodate Facebook proxied addresses

Reported by: graham_king Owned by: nobody
Component: contrib.auth Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The proxied email addresses Facebook provides via it's API look something like this: apps+107627842277.100000147873279.3fbf72360a409641ecb9202d8ac5af5e@…

That's 89 characters long, so it doesn't fit into the 75 characters in django.contrib.auth.models.User.email.

I'd like to suggest increasing that field's max_length to 200.

The only potential downside is that certain databases (Oracle) limit the total potential size of a row. That would only matter if someone heavily extended the auth_user table, which is rare. Usually the profile feature is used.

Can anyone see this causing a problem?

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by graham_king

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I would suggest doing this to all EmailField, so changing

django.db.models.field.__init__.py

line 641:

kwargs['max_length'] = kwargs.get('max_length', 75)

to replace the 75 with a 200. If this pushed a user table over the limit you can always pass max_length to EmailField.

The safer way is to add a max_length to auth.User's EmailField.

comment:2 Changed 5 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #11365, and I suspect a few others.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.