Skip to content

fix: decode only percent-encoded escapes in decodeURIComponent (#25672) (CP: 25.2) - #25735

Merged
Artur- merged 1 commit into
25.2from
claude/pr-25672-20260915-1723
Sep 16, 2026
Merged

Artur- merged 1 commit into
25.2from
claude/pr-25672-20260915-1723

Conversation

@Artur-

@Artur- Artur- commented Sep 15, 2026

Copy link
Copy Markdown
Member

UrlUtil.decodeURIComponent treated every non-ASCII character as a raw UTF-8 byte, even when it was never percent-encoded, so paths that already contain literal characters like ü or 日 were corrupted into the replacement character. Now only real %XX escapes are decoded and all other characters are left untouched.

Backport of #25672 to 25.2. The ResourceFolderUtilTest case from the original PR is omitted because ResourceFolderUtil does not exist on 25.2.

UrlUtil.decodeURIComponent treated every non-ASCII character as a raw
UTF-8 byte, even when it was never percent-encoded, so paths that already
contain literal characters like ü or 日 were corrupted into the
replacement character. Now only real %XX escapes are decoded and all
other characters are left untouched.

Backport of #25672 to 25.2. The ResourceFolderUtilTest case from the
original PR is omitted because ResourceFolderUtil does not exist on 25.2.

Co-authored-by: Artur Signell <260340+Artur-@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

 1 385 files  ±0   1 385 suites  ±0   1h 32m 42s ⏱️ + 1m 53s
10 427 tests +4  10 359 ✅ +4  68 💤 ±0  0 ❌ ±0 
10 782 runs  +4  10 713 ✅ +4  69 💤 ±0  0 ❌ ±0 

Results for commit 507b020. ± Comparison against base commit b948369.

@Artur-
Artur- enabled auto-merge (squash) September 16, 2026 05:50
@Artur-
Artur- merged commit ad7c003 into 25.2 Sep 16, 2026
35 checks passed
@Artur-
Artur- deleted the claude/pr-25672-20260915-1723 branch September 16, 2026 07:11
@vaadin-bot

Copy link
Copy Markdown
Collaborator

Hi @Artur- and @Artur-, when i performed cherry-pick to this commit to 24.10, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick ad7c003
error: could not apply ad7c003... fix: decode only percent-encoded escapes in decodeURIComponent (#25672) (CP: 25.2) (#25735)
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
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.2.9.

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.

3 participants