fix(sentry): update b64decode util to support cyrillic chars#394
Merged
fix(sentry): update b64decode util to support cyrillic chars#394
Conversation
…oBuffer utility function - Changed b64decode function to decode base64 strings using 'utf-8' instead of 'binary'.
e11sy
approved these changes
Apr 5, 2025
neSpecc
added a commit
that referenced
this pull request
Apr 6, 2025
* imp(notifier): add ttl for redis records (#391) * imp(notifier): add ttl for redis records * imp(notifier): replace hardcoded value with util const * fix(base64): update b64decode to use 'utf-8' encoding and add base64toBuffer utility function (#394) - Changed b64decode function to decode base64 strings using 'utf-8' instead of 'binary'. --------- Co-authored-by: e11sy <130844513+e11sy@users.noreply.github.com> Co-authored-by: Peter <specc.dev@gmail.com>
neSpecc
added a commit
that referenced
this pull request
Apr 6, 2025
* imp(notifier): add ttl for redis records (#391) * imp(notifier): add ttl for redis records * imp(notifier): replace hardcoded value with util const * fix(base64): update b64decode to use 'utf-8' encoding and add base64toBuffer utility function (#394) - Changed b64decode function to decode base64 strings using 'utf-8' instead of 'binary'. * imp(release): source map saving in transaction to solve race condition issue (#390) * imp(release): save map files in same transaction with real * test(release): test release with many map files * test(release): setup repl set for release worker tests * test(global): use mongo with replica set for tests * chore(test): close connection to avoid open handle * chore(release): uncomment endSession --------- Co-authored-by: e11sy <130844513+e11sy@users.noreply.github.com> Co-authored-by: Peter <specc.dev@gmail.com>
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.
In current implementation
base64decodebreaks Cyrillic chars which leads that item header's length is not correlate with real buffer part length— 8403 is correct item body length, but wrongly-encoded chars has other length.
The fix is to use UTF-8 when decoding base 64