Skip to content

fix: encode location query parameter in init request to preserve + (#24089) (CP: 25.1)#24410

Merged
vaadin-bot merged 1 commit into
25.1from
cherry-pick-24089-to-25.1-1779437769907
May 22, 2026
Merged

fix: encode location query parameter in init request to preserve + (#24089) (CP: 25.1)#24410
vaadin-bot merged 1 commit into
25.1from
cherry-pick-24089-to-25.1-1779437769907

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #24089 to branch 25.1.

Original PR description

Re-add encodeURIComponent() around the location parameter in the init request query string. Without encoding, a literal + in the URL path (e.g. /+/dashboard) is interpreted as a space by the servlet container's query parameter decoding, resulting in InvalidLocationException: Relative path cannot start with /

The encodeURIComponent was removed in #22791 to preserve %2F in wildcard parameters, but this is not needed: double-encoding (%2F becomes %252F) is correctly undone by the servlet's single query parameter decode.

…24089)

Re-add encodeURIComponent() around the location parameter in the init
request query string. Without encoding, a literal + in the URL path
(e.g. /+/dashboard) is interpreted as a space by the servlet container's
query parameter decoding, resulting in InvalidLocationException:
Relative path cannot start with /

The encodeURIComponent was removed in #22791 to preserve %2F in wildcard
parameters, but this is not needed: double-encoding (%2F becomes %252F)
is correctly undone by the servlet's single query parameter decode.
@sonarqubecloud
Copy link
Copy Markdown

@vaadin-bot
Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot]

@vaadin-bot vaadin-bot enabled auto-merge (squash) May 22, 2026 08:26
@github-actions
Copy link
Copy Markdown

Test Results

 1 396 files  +3   1 396 suites  +3   1h 24m 7s ⏱️ - 1m 20s
10 046 tests +1   9 976 ✅ +1  70 💤 ±0  0 ❌ ±0 
10 521 runs  +3  10 442 ✅ +3  79 💤 ±0  0 ❌ ±0 

Results for commit 1ef7216. ± Comparison against base commit 78bf8eb.

@vaadin-bot vaadin-bot merged commit 6329052 into 25.1 May 22, 2026
28 of 29 checks passed
@vaadin-bot vaadin-bot deleted the cherry-pick-24089-to-25.1-1779437769907 branch May 22, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants