Skip to content

BGDIINF_SB-2820 : legacy parameters double encoded#391

Merged
ltkum merged 1 commit intodevelopfrom
BGDIINF_SB-2820-swissSearch-legacy-compatibility
Mar 14, 2023
Merged

BGDIINF_SB-2820 : legacy parameters double encoded#391
ltkum merged 1 commit intodevelopfrom
BGDIINF_SB-2820-swissSearch-legacy-compatibility

Conversation

@ltkum
Copy link
Contributor

@ltkum ltkum commented Mar 14, 2023

Issue : Upon receiving legacy parameters, the application would encode them on reception (which is an expected behavior), then create a new query with those adapted parameters, which would encode them again (For example, a space would become %20, then %2520).

Fix : We decode the URI parameters before storing them in the new query Parameters, ensuring they won't be encoded twice.

Test link

@ltkum ltkum requested a review from ltshb March 14, 2023 07:21
@ltshb
Copy link
Contributor

ltshb commented Mar 14, 2023

Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

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

👍🏼

After testing on the old viewer, the + sign was not decoded in a space there so it is ok to have it in the search while translating legacy urls.

Issue : Upon receiving legacy parameters, the application would encode
them on reception (which is an expected behavior), then create a new
query with those adapted parameters, which would encode them again (For example, a space would become `%20`, then `%2520`).

Fix : We decode the URI parameters before storing them in the new query
Parameters, ensuring they won't be encoded twice.
@ltkum ltkum force-pushed the BGDIINF_SB-2820-swissSearch-legacy-compatibility branch from fd4e1e7 to 2f3d38a Compare March 14, 2023 08:10
@ltkum ltkum merged commit 4ae8f5b into develop Mar 14, 2023
@ltkum ltkum deleted the BGDIINF_SB-2820-swissSearch-legacy-compatibility branch March 14, 2023 08:38
@pakb pakb mentioned this pull request May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants