Skip to content

fix(utils): decode padded URL-safe base64 values - #31

Open
Hughhhhcoder wants to merge 1 commit into
TencentCloud:mainfrom
Hughhhhcoder:fix/urlsafe-base64-decode
Open

fix(utils): decode padded URL-safe base64 values#31
Hughhhhcoder wants to merge 1 commit into
TencentCloud:mainfrom
Hughhhhcoder:fix/urlsafe-base64-decode

Conversation

@Hughhhhcoder

Copy link
Copy Markdown

Summary

  • teach Base64DecodeConverter to fall back to padded URL-safe Base64 before trying the raw no-padding variant
  • keep the existing UTF-8 guard so lookalike binary payloads still round-trip unchanged
  • add regression coverage for both padded and unpadded URL-safe inputs

Testing

  • go test ./internal/utils -run 'TestBase64DecodeConverter'
  • go test ./internal/utils -run 'TestConvertFields_PathMode'

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.

1 participant