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: add support for UTF-8 and Unicode in guac.Parse #8

Merged
merged 1 commit into from Feb 2, 2022

Conversation

kriive
Copy link
Contributor

@kriive kriive commented Feb 1, 2022

This commit adds support for UTF-8 and Unicode in the guac.Parse func.
We also check for lengths before accessing the data buffer array.

In this commit we also add some tests to cover these edge cases.

@jakecoffman
Copy link
Collaborator

Thanks for pointing this out, looks like we have some other places that needs to be UTF-8 aware as well. It's interesting though that this hasn't come up for us before. I guess most of the time the UTF-8 is a single byte.

errors.go Outdated Show resolved Hide resolved
parse.go Outdated Show resolved Hide resolved
This commit adds support for UTF-8 and Unicode in the guac.Parse func.
We also check for lengths before accessing the data buffer array.

In this commit we also add some tests to cover these edge cases.
@kriive
Copy link
Contributor Author

kriive commented Feb 1, 2022

Ok, perfect, I should have resolved everything, let me know if I forgot something. In the next weeks I'll send other PRs to implement the file transfer REST endpoints along with a new Tunnel implementation beside the already present SimpleTunnel. That one will be much bigger than this one, I'm afraid :(

@jakecoffman jakecoffman merged commit efccee0 into wwt:master Feb 2, 2022
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