| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The input from the bot is marked as content-type "appliation/json; charset=utf-8" even if the charset would not be explicitly stated, RFC8259 requires the encoding to be UTF-8. The approach to read individual bytes from the inputstream and treat each byte as a character (ControllerBase.java) or even as url encoded data (app.java) are just invalid and work by plain luck. If only ascii input is tested, it most probably mostly works, but fails for all inputs with high bytes set. Jackson can decode JSON directly from an inputstream and then does the right thing, there is no need to manually read the stream.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The input from the bot is marked as content-type "appliation/json; charset=utf-8"
even if the charset would not be explicitly stated, RFC8259 requires the
encoding to be UTF-8.
The approach to read individual bytes from the inputstream and treat
each byte as a character (ControllerBase.java) or even as url encoded
data (app.java) are just invalid and work by plain luck. If only ascii
input is tested, it most probably mostly works, but fails for all inputs
with high bytes set.
Jackson can decode JSON directly from an inputstream and then does the
right thing, there is no need to manually read the stream.