FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: avoid exception-based Base64 decoder selection by arnabnandy7 · Pull Request #2173 · googleapis/google-http-java-client · GitHub

fix: avoid exception-based Base64 decoder selection - #2173

Open
arnabnandy7 wants to merge 1 commit into
googleapis:mainfrom
arnabnandy7:refactor/base64-exception-flow
Open

fix: avoid exception-based Base64 decoder selection#2173
arnabnandy7 wants to merge 1 commit into
googleapis:mainfrom
arnabnandy7:refactor/base64-exception-flow

Conversation

arnabnandy7 commented Jul 18, 2026
edited
Loading

Copy link
Copy Markdown
  • An issue was opened and discussed before writing the code
  • Tests and linting pass
  • Code coverage does not decrease; regression tests were added for Base64url decoding
  • Appropriate documentation was updated

Fixes #2159 ☕️

This change avoids using exceptions to select between standard Base64 and Base64url decoders. It normalizes trailing whitespace, detects Base64url-specific characters (- and _), and selects the appropriate decoder directly.

Regression tests cover padded, unpadded, and trailing-whitespace Base64url input.

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
arnabnandy7 requested a review from a team as a code owner July 18, 2026 09:15
product-auto-label Bot added the size: s Pull request size is small. label Jul 18, 2026
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

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Core: decodeBase64() catches and falls back to base64url using exceptions for control flow

1 participant


Back | FazBrowse Home | New Git URL