Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Basic auth fails for passwords which contain spaces #406

Closed
1 task done
syankov opened this issue May 23, 2019 · 0 comments · Fixed by #1599
Closed
1 task done

Basic auth fails for passwords which contain spaces #406

syankov opened this issue May 23, 2019 · 0 comments · Fixed by #1599
Labels

Comments

@syankov
Copy link

syankov commented May 23, 2019

Type of issue:

  • Bug

Current behavior:
When trying to log in in the ADF login component using basic authentication, the authentication fails when the password contains spaces (and most likely also for other escaped characters). It appears that the username and password strings are URI encoded before the authorization header is base64 encoded, which introduces additional characters to the Authorization header when username and/or password contain escaped characters:

basicAuth.password ? encodeURI(basicAuth.password) : ''

Example ADF login:

username: admin
password: A strong password!

results in
Authorization: Basic YWRtaW46QSUyMHN0cm9uZyUyMHBhc3N3b3JkIQ==
which is the equivalent of
Authorization: Basic admin:A%20strong%20password!

instead of
Expected Behavior
Authorization: Basic YWRtaW46QSBzdHJvbmcgcGFzc3dvcmQh
which would be
Authorization: Basic admin:A strong password!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants