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

External JSON parsing error when object/array claim contains escape characters #43

Closed
ufownl opened this issue Feb 1, 2024 · 3 comments

Comments

@ufownl
Copy link
Contributor

ufownl commented Feb 1, 2024

Hi, version 2.3.1 still has a small problem. If an object/array claim contains escape characters, it will lead external JSON parsing error. I checked the relevant code and found that the issue is here. The object/array claims should not be unescaped, they should retain their original content for the external JSON parser.

Additionally, I found that the function l8w8jwt_unescape_claim only escapes \" for keys, \" and \/ for values, and no other escape characters. I'm not sure if this is a feature or an issue.

@GlitchedPolygons
Copy link
Owner

@ufownl Hi :)

Unfortunately I don't have a lot of time to look into this atm, would it be ok for you to post more info (such as token used for decoding, expected behavior and actual behavior)?
I'm also open to review pull requests in case you feel like fixing it yourself 😃

@ufownl
Copy link
Contributor Author

ufownl commented Feb 2, 2024

This issue has almost no impact on my project at present, and I can try to fix it when I have time in the future. :)

GlitchedPolygons added a commit that referenced this issue Feb 3, 2024
Fix object/array claims encoding and issue #43
@ufownl
Copy link
Contributor Author

ufownl commented Feb 5, 2024

This issue has been fixed in PR #44, so it can be closed.

@ufownl ufownl closed this as completed Feb 5, 2024
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

No branches or pull requests

2 participants