-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly encode password in ServerSettingsModel #359
Conversation
The x-www-form-urlencoded MIME type says that we're URL-encoding the password, so we need to actually URL-encode the password if we want it to be handled correctly at the other end.
Testing this is proving a bit more difficult than anticipated. Because the buggy code is in ServerSettingsModel, which is only used in the "login" part of the Chorus GUI, the buggy code path is only used when logging into production Lexbox. However, when you try to set someone's password on Lexbox to something with & or + in it (there are only a few characters that trigger the bug), the frontend code doesn't allow you to do it. I can create a test user in my local dev instance of Lexbox (by temporarily disabling the frontend check that forbids those characters), but then to do S/R in FieldWorks I have to check the "Custom URL" checkbox and that won't go through the buggy codepath. To test this, I'll need to create a test user on Lexbox, then edit their data by hand in Postgres to set their password (and salt) to the password and salt that were created for my test user in local dev. Which I'm running out of time to do today. |
I have now tested it and proven that it works. Using the characters & or + is now safe in passwords with this bugfix. I created a test account with the password Once we fix the GHA build issues (which I suspect are because |
We still need a python2 package which 24.04 no longer offers, so run this on 22.04 until the need for the python2 package goes away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @rmunn)
I reviewed all the files, but I don't have permission in this repo to "approve". |
Note that I changed |
@hahn-kev - Looks like it's not auto-merging until the required status has been reported green — and it won't be reported green, because the status is looking for |
The x-www-form-urlencoded MIME type says that we're URL-encoding the password, so we need to actually URL-encode the password if we want it to be handled correctly at the other end.
Fixes #324.
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)