Skip to content

fix: encode location query parameter in init request to preserve + (#24089) (CP: 24.10) (#24414) (CP: 24.9)#24419

Merged
vaadin-bot merged 1 commit into
24.9from
cherry-pick-24414-to-24.9-1779443303629
May 22, 2026
Merged

fix: encode location query parameter in init request to preserve + (#24089) (CP: 24.10) (#24414) (CP: 24.9)#24419
vaadin-bot merged 1 commit into
24.9from
cherry-pick-24414-to-24.9-1779443303629

Conversation

@vaadin-bot
Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #24414 to branch 24.9.

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) (CP: 24.10) (#24414)

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.
@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 09:54
@github-actions
Copy link
Copy Markdown

Test Results

1 294 files  + 3  1 294 suites  +3   1h 16m 0s ⏱️ + 1m 14s
8 913 tests + 1  8 851 ✅ + 1  62 💤 ±0  0 ❌ ±0 
9 307 runs  +62  9 239 ✅ +63  68 💤  - 1  0 ❌ ±0 

Results for commit 9c2a9d0. ± Comparison against base commit 46ff0c5.

@vaadin-bot vaadin-bot merged commit 1e52708 into 24.9 May 22, 2026
23 of 27 checks passed
@vaadin-bot vaadin-bot deleted the cherry-pick-24414-to-24.9-1779443303629 branch May 22, 2026 10:13
@sonarqubecloud
Copy link
Copy Markdown

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