Skip to content

Conversation

@neSpecc
Copy link
Member

@neSpecc neSpecc commented Apr 5, 2025

In current implementation base64decode breaks Cyrillic chars which leads that item header's length is not correlate with real buffer part length

{"content_type":"application/json","type":"event","length":8403}
{"timestamp":"2025-04-03T13:16:38.430Z","exception":{"values":[{"type":"Exception","value":"ТеÑÑÐ¾Ð²Ð°Ñ Ð¾Ñибка #287"...

— 8403 is correct item body length, but wrongly-encoded chars has other length.

The fix is to use UTF-8 when decoding base 64

…oBuffer utility function

- Changed b64decode function to decode base64 strings using 'utf-8' instead of 'binary'.
@neSpecc neSpecc merged commit 690c484 into master Apr 6, 2025
4 checks passed
@neSpecc neSpecc deleted the sentry-utf branch April 6, 2025 09:06
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>
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.

2 participants