Skip to content

fix!: no double decode query parameters - #12916

Merged
joheriks merged 7 commits into
masterfrom
joheriks/fix-double-decode-query-params
Feb 3, 2022
Merged

joheriks merged 7 commits into
masterfrom
joheriks/fix-double-decode-query-params

Conversation

@joheriks

@joheriks joheriks commented Feb 2, 2022 •

Copy link
Copy Markdown
Contributor

Fix 1: Don't double-decode query parameters.

Fix 2: URI.getQuery is broken, making it impossible to distinguish & separating
parameters from literal ampersands:
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Fix 3: Return a properly encoded query string from
QueryParamaters.getQueryString instead of justing joining the decoded
strings in the map. This is a potentially breaking change.

Fixes #12887

@joheriks
joheriks force-pushed the joheriks/fix-double-decode-query-params branch from df685fd to 4ec83a8 Compare February 2, 2022 14:13
URI.getQuery decodes the entire query string, making it impossible to
distinguish & separating parameters from literal values:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Also return a properly encoded query string from
QueryParamaters.getQueryString instead of justing joining the decoded
strings in the map. This is a potentially breaking change.
@joheriks
joheriks force-pushed the joheriks/fix-double-decode-query-params branch from 4ec83a8 to 3ac1731 Compare February 2, 2022 14:18
@github-actions

github-actions Bot commented Feb 2, 2022 •

Copy link
Copy Markdown
Contributor

Unit Test Results

   773 files  ±  0     773 suites  ±0   30m 19s ⏱️ -18s
5 769 tests ±  0  5 721 ✔️ ±  0  48 💤 ±0  0 ❌ ±0 
5 803 runs  +16  5 754 ✔️ +15  49 💤 +1  0 ❌ ±0 

Results for commit 7836022. ± Comparison against base commit 9933d81.

♻️ This comment has been updated with latest results.

@caalador caalador left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 Wrong values in assert messages.

@sonarqubecloud

sonarqubecloud Bot commented Feb 3, 2022

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@joheriks
joheriks merged commit 6cde3e5 into master Feb 3, 2022
@joheriks
joheriks deleted the joheriks/fix-double-decode-query-params branch February 3, 2022 12:50
vaadin-bot pushed a commit that referenced this pull request Feb 3, 2022
URI.getQuery decodes the entire query string, making it impossible to
distinguish & separating parameters from literal values:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Also return a properly encoded query string from
QueryParameters.getQueryString. This is a potentially breaking change,
as previously these were not encoded before being joined.
vaadin-bot pushed a commit that referenced this pull request Feb 3, 2022
URI.getQuery decodes the entire query string, making it impossible to
distinguish & separating parameters from literal values:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Also return a properly encoded query string from
QueryParameters.getQueryString. This is a potentially breaking change,
as previously these were not encoded before being joined.
vaadin-bot pushed a commit that referenced this pull request Feb 3, 2022
URI.getQuery decodes the entire query string, making it impossible to
distinguish & separating parameters from literal values:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Also return a properly encoded query string from
QueryParameters.getQueryString. This is a potentially breaking change,
as previously these were not encoded before being joined.
vaadin-bot added a commit that referenced this pull request Feb 3, 2022
URI.getQuery decodes the entire query string, making it impossible to
distinguish & separating parameters from literal values:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Also return a properly encoded query string from
QueryParameters.getQueryString. This is a potentially breaking change,
as previously these were not encoded before being joined.

Co-authored-by: Johannes Eriksson <joheriks@vaadin.com>
joheriks pushed a commit that referenced this pull request Feb 4, 2022
URI.getQuery decodes the entire query string, making it impossible to
distinguish & separating parameters from literal values:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Also return a properly encoded query string from
QueryParameters.getQueryString. This is a potentially breaking change,
as previously these were not encoded before being joined.
joheriks pushed a commit that referenced this pull request Feb 4, 2022
URI.getQuery decodes the entire query string, making it impossible to
distinguish & separating parameters from literal values:

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214423'

Also return a properly encoded query string from
QueryParameters.getQueryString. This is a potentially breaking change,
as previously these were not encoded before being joined.
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with platform 14.8.4.

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.

Problem with fix for #12354

3 participants