Fixes validation of input bytes in the Base64 decoder#9623
Merged
normanmaurer merged 1 commit intonetty:masterfrom Oct 10, 2019
fenik17:base64_decoder_validation
Merged
Fixes validation of input bytes in the Base64 decoder#9623normanmaurer merged 1 commit intonetty:masterfrom fenik17:base64_decoder_validation
normanmaurer merged 1 commit intonetty:masterfrom
fenik17:base64_decoder_validation
Conversation
|
Can one of the admins verify this patch? |
Contributor
Author
|
@njhill thanx! I also fixed an |
njhill
approved these changes
Oct 1, 2019
Member
|
@netty-bot test this pleas |
Member
|
@netty-bot test this please |
normanmaurer
requested changes
Oct 6, 2019
Member
There was a problem hiding this comment.
Please ensure to release all the created ByteBuf instances in a finally block (true for all added tests)
Member
There was a problem hiding this comment.
You could also use copiedBuffer(...) to reduce some boilerplate
Contributor
Author
|
@normanmaurer test fixed |
Member
|
@netty-bot test this please |
Member
|
@fenik17 can you please rebase ? |
Motivation: In the current implementation of Base64 decoder an invalid character `\u00BD` treated as `=`. Also character `\u007F` leads to ArrayIndexOutOfBoundsException. Modification: Explicitly checks that all input bytes are ASCII characters (greater than zero). Fix `decodabet` tables. Result: Correctly validation input bytes in Base64 decoder.
Contributor
Author
|
@normanmaurer rebased |
Member
|
@netty-bot test this please |
normanmaurer
approved these changes
Oct 10, 2019
normanmaurer
pushed a commit
that referenced
this pull request
Oct 10, 2019
Motivation: In the current implementation of Base64 decoder an invalid character `\u00BD` treated as `=`. Also character `\u007F` leads to ArrayIndexOutOfBoundsException. Modification: Explicitly checks that all input bytes are ASCII characters (greater than zero). Fix `decodabet` tables. Result: Correctly validation input bytes in Base64 decoder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
In the current implementation of Base64 decoder an invalid character
½(\u00BD) is treated as=. Also the character\u007Fleads toArrayIndexOutOfBoundsException.Modification:
Explicitly checks that all input bytes are ASCII characters (greater than zero). Fix decodabet tables.
Result:
Correctly validation input bytes in Base64 decoder.