fix: validate that all characters after first padding character in Base64 decode#7491
Merged
DenizAltunkapan merged 2 commits intoJun 22, 2026
Conversation
…lso padding characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7491 +/- ##
=========================================
Coverage 79.88% 79.88%
- Complexity 7340 7343 +3
=========================================
Files 809 809
Lines 23847 23851 +4
Branches 4694 4697 +3
=========================================
+ Hits 19050 19054 +4
- Misses 4035 4036 +1
+ Partials 762 761 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
DenizAltunkapan
approved these changes
Jun 22, 2026
DenizAltunkapan
left a comment
Member
There was a problem hiding this comment.
@priyanshuvishwakarma273403 very good, thank you.
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.
Description
Fixes a bug where
Base64.decodeaccepted malformed inputs with data characters appearing after a padding character=(e.g. "QQ=Q").Related Issue
Fixes #7482
Changes
Base64.decodeto assert that all characters starting from the first=character to the end of the input string are also=.Base64Test.javato prevent regression.