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: fix ServletFileUpload header encoding #20480

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

tltv
Copy link
Member

@tltv tltv commented Nov 15, 2024

This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise. Only for setups without multipart config for servlet.

Fixes: #20417

This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise.
Only for setups without multipart config for servlet.

Fixes: #20417
Copy link

github-actions bot commented Nov 15, 2024

Test Results

  963 files  ± 0    963 suites  ±0   50m 28s ⏱️ + 2m 9s
6 312 tests + 2  6 263 ✅ + 2  49 💤 ±0  0 ❌ ±0 
6 577 runs  +13  6 520 ✅ +13  57 💤 ±0  0 ❌ ±0 

Results for commit e048e29. ± Comparison against base commit 873b5b6.

♻️ This comment has been updated with latest results.

tepi
tepi previously approved these changes Nov 15, 2024
flow-tests/pom.xml Outdated Show resolved Hide resolved
@tltv tltv force-pushed the fix/20417-upload-filename-character-encoding branch from f5adae1 to e509d7f Compare November 18, 2024 09:42
@mshabarov mshabarov requested a review from tepi November 18, 2024 12:40
@tepi tepi merged commit b1a71f7 into 23.5 Nov 18, 2024
26 checks passed
@tepi tepi deleted the fix/20417-upload-filename-character-encoding branch November 18, 2024 12:41
@vaadin-bot
Copy link
Collaborator

Hi @tltv and @tepi, when i performed cherry-pick to this commit to 24.5, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick b1a71f7
error: could not apply b1a71f7... fix: fix ServletFileUpload header encoding (#20480)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

Hi @tltv and @tepi, when i performed cherry-pick to this commit to 24.4, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick b1a71f7
error: could not apply b1a71f7... fix: fix ServletFileUpload header encoding (#20480)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

Hi @tltv and @tepi, when i performed cherry-pick to this commit to main, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick b1a71f7
error: could not apply b1a71f7... fix: fix ServletFileUpload header encoding (#20480)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

tltv added a commit that referenced this pull request Nov 18, 2024
This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise.
Only for setups without multipart config for servlet.

Fixes: #20417
tepi pushed a commit that referenced this pull request Nov 19, 2024
* fix: fix ServletFileUpload header encoding (#20480)

This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise.
Only for setups without multipart config for servlet.

Fixes: #20417

* chore: formatting

* test: fixed test
tltv added a commit that referenced this pull request Nov 19, 2024
This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise.
Only for setups without multipart config for servlet.

Fixes: #20417
tltv added a commit that referenced this pull request Nov 19, 2024
This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise.
Only for setups without multipart config for servlet.

Fixes: #20417
tepi pushed a commit that referenced this pull request Nov 19, 2024
* fix: fix ServletFileUpload header encoding (#20480)

This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise.
Only for setups without multipart config for servlet.

Fixes: #20417

* test: fixed test

* chore: formatting
tepi pushed a commit that referenced this pull request Nov 19, 2024
* fix: fix ServletFileUpload header encoding (#20480)

This change will set ServletFileUpload's header encoding always to UTF-8 in StreamReceiverHandler when request character encoding is null. This ensures that system's default character encoding is not applied when parsing filename of the uploaded file, unless request's character encoding is set otherwise.
Only for setups without multipart config for servlet.

Fixes: #20417

* chore: fixed test and formatting
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.5.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants