Skip to content

decode digest auth data as UTF-8 in handleAuthentication#2399

Open
jmestwa-coder wants to merge 1 commit into
apache:masterfrom
jmestwa-coder:digest-auth-utf8
Open

decode digest auth data as UTF-8 in handleAuthentication#2399
jmestwa-coder wants to merge 1 commit into
apache:masterfrom
jmestwa-coder:digest-auth-utf8

Conversation

@jmestwa-coder
Copy link
Copy Markdown

handleAuthentication decodes the incoming auth bytes with new String(authData), which uses the platform default charset, while digest() hashes the credential with getBytes(UTF_8). On a JVM whose default charset is not UTF-8, a credential with non-ASCII characters then hashes to a different value than the one generateDigest produced for the matching ACL, so the digest id stops matching and auth fails. Decode as UTF_8 so both paths agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant