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

Mojo::JSON encoding and decoding of binary data "\a\b" #561

Merged
merged 2 commits into from Nov 8, 2013
Merged

Mojo::JSON encoding and decoding of binary data "\a\b" #561

merged 2 commits into from Nov 8, 2013

Conversation

ig3
Copy link
Contributor

@ig3 ig3 commented Nov 8, 2013

Hi Sebastian,

Mojo::JSON.pm appears to have incorrect mapping of the escape character "\b" to "\x07" instead of "\x08". As a result, in my use, binary data encoded by Mojo::JSON arrives at the client subtly corrupted.

I have added tests for the encoding of "\a\b" and decoding of the corresponding JSON data, and changed Mojo::JSON.pm to handle these characters correctly, as I understand the situation.

Regards,
Ian

There was no test for the encoding to JSON of "\a\b" or the decoding of
the corresponding JSON data. This change adds such tests.
Mojo::JSON has incorrect value associated with the escaped special
character 'b'. This change corrects the value, from '\x07' to '\x08'.
kraih added a commit that referenced this pull request Nov 8, 2013
Mojo::JSON encoding and decoding of binary data "\a\b"
@kraih kraih merged commit 76bcb80 into mojolicious:master Nov 8, 2013
@kraih
Copy link
Member

kraih commented Nov 8, 2013

Thanks, applied.

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.

None yet

2 participants