Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

PLG: encode URL search params#63275

Merged
taras-yemets merged 2 commits into
mainfrom
ty/plg-encode-signout-url-search-params
Jun 14, 2024
Merged

PLG: encode URL search params#63275
taras-yemets merged 2 commits into
mainfrom
ty/plg-encode-signout-url-search-params

Conversation

@taras-yemets

@taras-yemets taras-yemets commented Jun 14, 2024

Copy link
Copy Markdown
Contributor

Fixes bug intorduced in https://github.com/sourcegraph/sourcegraph/pull/63231

Encode the URL search params added to returnTo search param value.

Previously the search param value hasn't been encoded resulting in URLs with broken search params , e.g. "/sign-in?returnTo=/cody/manage?teamID=1&inviteID=2" (note the second "?" making the search params invalid).

Test plan

  • CI
  • Tested manually:
    • Make signOutAndRedirectToSignIn available in the window object, e.g. window.signOutAndRedirectToSignIn = signOutAndRedirectToSignIn in the client/web/src/cody/management/api/react-query/callCodyProApi.ts
    • On "/cody/manage" page (any page works actually) ensure that a few search params are added to the URL
    • call signOutAndRedirectToSignIn in the browser console
    • ensure you have been sign out, signed back in and the search params are still in the URL

Changelog

@taras-yemets taras-yemets merged commit fadcaa2 into main Jun 14, 2024
@taras-yemets taras-yemets deleted the ty/plg-encode-signout-url-search-params branch June 14, 2024 17:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants