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.

@jmestwa-coder

Copy link
Copy Markdown
Author

the only ci run errored before it actually built (jenkins reported "this commit cannot be built"), so i rebased on current master to retrigger it. no change beyond the original one-line utf-8 decode.

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