Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Fix URL params decoding #11931

Merged
merged 3 commits into from
Jan 4, 2022
Merged

ui: Fix URL params decoding #11931

merged 3 commits into from
Jan 4, 2022

Conversation

johncowen
Copy link
Contributor

In 1.11.0/1 we moved our routing to use our Routlets almost entirely, but we missed moving the extra URL decoding for Ember Wildcard routes over to our routlet code that deals with URL params 😿 (Ember does not urlencode/urldecode wildcard routes by default)

This PR moves the code from our base Route (which all of our routes inherit from) over to our Routlet Service via a normalizeParamsFor method, which we then call from both our base Route and the Routlet Service. Whilst we barely use Ember Routes anymore, I left the required decoding in our base Route just incase it's required in future.

I'm a little surprised we had no acceptance test for this, so this fixes an unfortunate regression in 1.11.0/1 plus adds an acceptance test which would have caught this (and will catch it if it ever happens again)

Fixes #11925

Small note here: If we ever want this to be non-project specific we'll have to decide on how to inject the project specific routes into the routlet service, for the moment we simply import

@johncowen johncowen added theme/ui Anything related to the UI backport/1.11 labels Jan 4, 2022
@johncowen johncowen requested review from jgwhite, amyrlam, a user and natmegs January 4, 2022 12:57
@vercel vercel bot temporarily deployed to Preview – consul January 4, 2022 14:49 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging January 4, 2022 14:49 Inactive
@johncowen johncowen merged commit f8b336b into main Jan 4, 2022
@johncowen johncowen deleted the ui/bugfix/params-decode branch January 4, 2022 16:08
@hc-github-team-consul-core
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/538867.

@hc-github-team-consul-core
Copy link
Contributor

🍒✅ Cherry pick of commit f8b336b onto release/1.11.x succeeded!

hc-github-team-consul-core pushed a commit that referenced this pull request Jan 4, 2022
* ui: Move wildcard param decoding to routlet service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edit kv in webui which key contains '@' cause 404
2 participants