-
Notifications
You must be signed in to change notification settings - Fork 438
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
[CST-4767] Password are not properly url encoded at login #1375
Conversation
@artlowel : Added you as a secondary reviewer...it might only need a very quick glance from you. I'll give it a test myself though. |
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.
👍 Verified the bug on demo7.dspace.org with the "test@example.com" account as described in #1367. Also verified that this PR fixes that bug, and login works as expected even when a username or password includes special characters. Thanks @davidenegretti-4science !
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.
Thanks @davidenegretti-4science!
It works, but why not simply get rid of the loginEncodeUrl
method and the encode-decode.util.ts
file, and use encodeURIComponent
directly?
The method was kept in order to mantain test coverage. Now I have removed it and tested again |
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.
Thanks!
References
Description
When submitting login form only a few special characters were manually URL encoded. Now all special characters are automatically encoded with
encodeURIComponent()
.Instructions for Reviewers
Login should now be possible when username and password contain special characters like
#%+!
List of changes in this PR:
encode-decode.util.ts
has been fixedChecklist
yarn run lint
package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.