Skip to content
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

getBytes() method may produce unwanted results #26

Closed
firaja opened this issue Feb 4, 2021 · 0 comments · Fixed by #27
Closed

getBytes() method may produce unwanted results #26

firaja opened this issue Feb 4, 2021 · 0 comments · Fixed by #27
Labels
status: confirmed type: bug Something isn't working
Milestone

Comments

@firaja
Copy link
Member

firaja commented Feb 4, 2021

The usage of String#getBytes() inside the library without any explicit charset make the result depend on the JKD implementation of Charset.defaultCharset().

If a target system uses a different default charset and/or declares a different file.encoding property, hashing or checking passwords may not work properly.

Solution

Find all String#getBytes() and replace them so that the charset (UTF-8) is explicit.

@firaja firaja added the type: bug Something isn't working label Feb 4, 2021
@firaja firaja added this to the 1.6.1 milestone Feb 4, 2021
firaja added a commit that referenced this issue Feb 4, 2021
@firaja firaja closed this as completed in #27 Feb 4, 2021
firaja added a commit that referenced this issue Feb 4, 2021
#26: Strings are always converted to byte[]  with the same encoder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant