Closed Bug 1543193 Opened 1 year ago Closed 1 year ago

Some pages don't support usernames with points or other characters

Categories

(Webtools :: Pontoon, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hirata, Assigned: hirata, Mentored)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36

Steps to reproduce:

  1. Deploy pontoon in heroku
  2. Created a user with a username with a point "." (ex: "my.admin")
  3. Made a contribution with in a project with this user
  4. Access the page https://mypontoonapp.herokuapp.com/contributors

Actual results:

Got the following error:
NoReverseMatch at /contributors/
Reverse for 'pontoon.contributors.contributor.username' with arguments '(u'my.admin',)' not found. 1 pattern(s) tried: ['contributors/(?P<username>[\w-]+)/$']

Expected results:

The pontoon.contributors.contributor.username should accept a broader regexp for the username argument.

Thanks for the report! On pontoon.mozilla.org, we use Firefox Accounts for authentication and generate usernames through PontoonSocialAdapter.

So for our use case, we cover all possible usernames. However, since DJANGO_LOGIN is also supported for 3rd Pontoon deployments, we should extend the regex to cover all usernames that can be stored in the model.

For the exact regex, see django.contrib.auth.validators.

Since the bugfix is not required for our internal use case, I'm marking the bug as P5.

Mentor: m
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Assignee: nobody → hirata
You need to log in before you can comment on or make changes to this bug.