Repository navigation
Use decodeUtf8' instead of throwing - #84
Merged
Merged
Conversation
ysangkok
force-pushed
the
no-exception-utf8
branch
from
September 21, 2026 19:35
cc40cbd to
9b2e7d5
Compare
Contributor
Author
|
@fpringle please have a look |
fpringle
suggested changes
Sep 22, 2026
fpringle
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Can we add some documentation explaining that non-UTF8 form submissions will be rejected when Lenient is not used?
tchoutri
approved these changes
Sep 22, 2026
English locales use windows-1252 per default, so they could crash the Server when submitting certain non-ASCII filenames. After this change, even unread inputs/files are validated. This means that there could be users that had previously working code with ignored files, that now fails validation. These users should specify UTF-8 on the form, or submit a PR to implement support for non-UTF8 encodings.
ysangkok
force-pushed
the
no-exception-utf8
branch
from
September 22, 2026 16:22
9b2e7d5 to
2066c1d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTML forms do not use UTF8 per default, so they could crash the
server when submitting certain non-ASCII filenames.
The cause is
decodeUtf8, which throws an exception when an invalid UTF8 input is provided.After this the change to
decodeUtf8', even unread inputs/files are validated. This meansthat there could be users that had previously working code with ignored
files, that now fails validation. These users should specify UTF-8 on
the form, or submit a PR to implement support for non-UTF8 encodings.