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 encode gzipped data #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tiagoinaba
Copy link

string(gzippedData) does not guarantee a UTF-8 sanitized string, which may lead to corrupted data.

Also, returned the non-nil error from GetFromSession to make debugging easier and changed the test file to also encode the test data into base64.

I was getting gzip: invalid header in my app and upon inspection found the sequence 239 191 189 repeated many times across the gzipped data, including in the gzip header.

`string(gzippedData)` does not guarantee a UTF-8 sanitized string,
which may lead to corrupted data.
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