You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2022/09/29 08:11:43 UTC

[GitHub] [knox] zeroflag opened a new pull request, #640: KNOX-2810 - Login on Knox UI doesn't work when the password contains special character

zeroflag opened a new pull request, #640:
URL: https://github.com/apache/knox/pull/640

   ## What changes were proposed in this pull request?
   
   The `btoa` (third party) javascript functions can't base64 encode some of the special characters such as the letter `ë`. 
   We use this function to create the basic authorization header. If user's password contains an unsupported character the login will fail.
   
   
   ## How was this patch tested?
   
   I tested the new funciton manully:
   
   ```
   unicodeBase64Encode('árvíztűrő tükörfúrógép ë !#$%^&*()_!#@V')
   'w6FydsOtenTFsXLFkSB0w7xrw7ZyZsO6csOzZ8OpcCDDqyAhIyQlXiYqKClfISNAVg=='
   
   unicodeBase64Encode('阪熊奈岡鹿梨阜埼茨栃')
   '6Ziq54aK5aWI5bKh6bm/5qKo6Zic5Z+86Iyo5qCD'
   阪熊奈岡鹿梨阜埼茨栃
   ```
   The I decoded the result I got back the original string.
   
   The I changed sam's password in users.ldif:
   
   ```
   # entry for sample user sam
   dn: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org
   objectclass:top
   objectclass:person
   objectclass:organizationalPerson
   objectclass:inetOrgPerson
   cn: sam
   sn: sam
   uid: sam
   userPassword: 阪熊奈岡鹿梨阜埼茨栃 árvíztűrő tükörfúrógép ë !#$%^&*()_!#@V
   ```
   
   Unfortunately the demo ldap server could not parse this password because it calls `Strings.toLowerCaseAscii(line)` on each line of the ldif file. After I temporary removed the toLowerCase I was able to start the demo ldap with this config.
   
   I check the login on the knox ui using the knoxsso topology and I was able to successfully login.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [knox] zeroflag merged pull request #640: KNOX-2810 - Login on Knox UI doesn't work when the password contains special character

Posted by GitBox <gi...@apache.org>.
zeroflag merged PR #640:
URL: https://github.com/apache/knox/pull/640


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [knox] zeroflag commented on pull request #640: KNOX-2810 - Login on Knox UI doesn't work when the password contains special character

Posted by GitBox <gi...@apache.org>.
zeroflag commented on PR #640:
URL: https://github.com/apache/knox/pull/640#issuecomment-1261944731

   > Before I approve please confirm you tested this in at least 3 different browsers: Chrome, Firefox and Safari for instance.
   
   I tested all three, it worked.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org