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

fix: /base64 endpoint decodes both URL-safe and standard b64 encodings #153

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

mccutchen
Copy link
Owner

As reported in #152, the /base64 endpoint can only decode the "URL-safe" base64 encoding, but the error it returns is not very useful if you're not already familiar with different base64 encoding variants.

Here we follow Postel's law and accept either the URL-safe or standard encodings, while continuing to use the URL-safe variant when encoding ourselves.

Fixes #152.

Copy link

codecov bot commented Nov 5, 2023

Codecov Report

Merging #153 (a6e3060) into main (e3c4f8d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #153   +/-   ##
=======================================
  Coverage   98.04%   98.05%           
=======================================
  Files           8        8           
  Lines        1588     1591    +3     
=======================================
+ Hits         1557     1560    +3     
  Misses         22       22           
  Partials        9        9           
Files Coverage Δ
httpbin/helpers.go 96.64% <100.00%> (+0.03%) ⬆️

@mccutchen mccutchen marked this pull request as ready for review November 5, 2023 13:21
@mccutchen mccutchen merged commit 844a11a into main Nov 5, 2023
8 checks passed
@mccutchen mccutchen deleted the b64err branch November 5, 2023 13:22
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.

Emoji string fails to decode
1 participant