Can't access because existing username is longer 30 characters

RESOLVED FIXED

Status

Webtools Graveyard
Verbatim
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: flod, Assigned: peterbe)

Tracking

Details

(Reporter)

Description

5 years ago
This morning I've discovered that I'm not able to access Verbatim anymore.

My username has always been francesco.lodolo@mozillaitalia.org, but now the login field has a maxlength set to 30 characters. Tried to change it with developer tools, but then I get other errors.

If I go through the password reset process, mail confirms that my user it's still 34 characters long.

TBH I think the username's length should be restored to the previous value (if there was one), or at least check if there are other usernames longer than 30 characters and do something with that.

Comment 1

5 years ago
@Milos do you know if this is a Django change or something related to LDAP? I don't think there is anything specific on Pootle that we've changed that would causes this.

Comment 2

5 years ago
Let's ask Peter.
Flags: needinfo?(peterbe)
(Assignee)

Comment 3

5 years ago
Interesting. I haven't touched the production site for over a year. 

:flod, do you have any idea when this started to manifest itself? I.e. how long ago was it that you were able to log in with that 34 characters email address?
Flags: needinfo?(peterbe)
(Reporter)

Comment 4

5 years ago
Good question, I haven't been working on Verbatim for a while but I'm still responsible for Italian. 

For sure I entered around February this year to fix some privileges (maybe I was still using an old cookie? How long does it last?).
(Assignee)

Updated

5 years ago
Assignee: nobody → peterbe
Status: NEW → ASSIGNED
(Assignee)

Comment 5

5 years ago
I'm really struggling to solve this. I first thought it's the new registration form [0] that I touched that might have regressed on the length of the username field. 
But, that's only the registration form. Now the log in form. I don't remember ever working on the log in form. 

So why would it have changed?

I noticed that Django fixed this (from 30 to 254 characters) in this commit:
https://github.com/django/django/commit/bfcda7781a886ab2b7b41937c0f49c088f58a3d7

But it seems this is a recent change so most likely, this has always been this way. 

[0] https://github.com/mozilla/mozilla-pootle-extras/blob/master/forms.py
(Assignee)

Comment 6

5 years ago
:flod could it be that you actually never logged in? You obviously signed up at one point and most definitely followed the account activation link. Perhaps at some point logged you in without you having to use the bad log in form.
(Reporter)

Comment 7

5 years ago
I used to login from several machines when I worked on web development. At some point I definitely did login ;-)

IIRC correcly Pascal told me that this happened in the past because of Pootle's upgrades. Could be something from Pootle directly?
https://github.com/translate/pootle/blob/master/pootle/apps/registration/forms.py#L34
(Assignee)

Comment 8

5 years ago
(In reply to Francesco Lodolo [:flod] from comment #7)
> I used to login from several machines when I worked on web development. At
> some point I definitely did login ;-)
> 
Let's leave that as a mystery. From what I can tell, the login form has never allowed longer than 30 characters.

> IIRC correcly Pascal told me that this happened in the past because of
> Pootle's upgrades. Could be something from Pootle directly?
> https://github.com/translate/pootle/blob/master/pootle/apps/registration/
> forms.py#L34

That's the registration form. We're using this by the way: https://github.com/mozilla/verbatim/blob/master/external_apps/registration/forms.py#L33
Not pootle's. 

I have a fix but I'm struggling right now to upgrade the server.
(Assignee)

Comment 9

5 years ago
A solution is now in place. Pushed to master:
https://github.com/mozilla/verbatim/commit/defb3c4867483fa7a6b29691efc1716457f73f58

However, due to network access I can't upgrade the server. Working on it with IT.
(Assignee)

Comment 10

5 years ago
Yay! I've now managed to upgrade the server and restarted it. 

Can you log in now?
(Reporter)

Comment 11

5 years ago
Yes, working fine now :-)
(Assignee)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 12

4 years ago
And we are again ;-)

Update to Pootle 2.5, no more possibility to login.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 13

4 years ago
Are you able to log in on https://localize.allizom.org?

I checked, the code mentioned in comment #9 is definitely in place on production too now.
(Reporter)

Comment 14

4 years ago
I'm not able to login
https://localize.allizom.org/accounts/login/?next=%2F

This line is pretty clear why I can't
<input id="id_username" type="text" maxlength="30" name="username"></input>
(Assignee)

Comment 15

4 years ago
So it has regressed?! How terrible! Because, at one point, you were able to log in and now you're not (i.e. the form has gone back to `maxlength="30"`)
(Reporter)

Comment 16

4 years ago
Exactly. On my iMac I'm logged in thanks to an existing cookie (after you fixed it at the end of May), on other computers I can't type the full username.
(Assignee)

Comment 17

4 years ago
Actually, I don't think it's regression. When we used an earlier version of Pootle, it was possible to do the patch that I did in comment #9. 

Now that we're on Pootle 2.5, that's no longer possible. So at this point both dev and prod are using the bad login form. 

I'm working on a solution.
(Reporter)

Comment 18

4 years ago
Can we fix this? Right now I'm officially closed out of Verbatim, and I'm the locale manager for my language (i.e. the one who gives away permissions to other localizers) :-\
(Assignee)

Comment 19

4 years ago
I was hoping for some movement on http://bugs.locamotion.org/show_bug.cgi?id=3063
but perhaps it's just worth hacking it for now because this is just annoying.
(Assignee)

Comment 20

4 years ago
Well, I made that pull request to pootle [1] but that's going to take a while till we get into our tagged version of pootle. 

So, after 2-3 hours of hair pulling I finally managed to figure out a hack to override things. 
Please test it out on https://localize.allizom.org/accounts/login/?next=%2F

Check out the HTML source and note that it now has `maxlength="75"`. 


[1] https://github.com/translate/pootle/pull/127
(Reporter)

Comment 21

4 years ago
(In reply to Peter Bengtsson [:peterbe] from comment #20)
> Please test it out on https://localize.allizom.org/accounts/login/?next=%2F

Yep, there I can login :-)
(Assignee)

Comment 22

4 years ago
:Milos, you ok with me merging development onto master and restarting prod?
(Assignee)

Comment 23

4 years ago
This should now have been deployed on production.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago4 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.