Skip to content

[v17] Device Trust web: Ensure query params of redirect URL are not lost#62678

Merged
ravicious merged 3 commits intobranch/v17from
r7s/v17/backport-62389-devicetrust-query-param
Jan 8, 2026
Merged

[v17] Device Trust web: Ensure query params of redirect URL are not lost#62678
ravicious merged 3 commits intobranch/v17from
r7s/v17/backport-62389-devicetrust-query-param

Conversation

@ravicious
Copy link
Copy Markdown
Member

@ravicious ravicious commented Jan 7, 2026

Backport #62389 to branch/v18

changelog: Fixed an issue where logging in to the Web UI with Device Trust would lose query params of the redirect URL

Manual backport because v17 doesn't have a small change that was a result of updating typescript-eslint.

Also had to update Jest (by essentially backporting #56294 and #56295) because the old JSDOM version used by Jest on this branch did not support URLSearchParams.prototype.size which caused the tests for the new implementation to fail.

* Device Trust: Append query params to the processed redirect_uri

* teleterm: Do not construct query params by hand

This messes up the encoding. When interpolating redirect_uri within a
string, the URL is simply not going to get encoded. This means that if
redirect_uri is something like "https://example.com/hello?foo=1&bar=2",
"bar=2" is going to be interpreted as one of the query param of the
returned URL, not as one of the query params of redirect_uri.

* makeDeepLinkWithSafeInput: Use URLSearchParams to construct query params

This is not quite necessary, the previous code was good enough. But just
to be safe, instead of constructing query params manually we can just
delegate it to URLSearchParams.

* teleterm deep links: Add tests for redirect_uri with query params
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from codingllama January 7, 2026 16:00
@public-teleport-github-review-bot
Copy link
Copy Markdown

@ravicious - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

@socket-security
Copy link
Copy Markdown

@ravicious ravicious enabled auto-merge January 8, 2026 10:10
@ravicious ravicious added this pull request to the merge queue Jan 8, 2026
Merged via the queue into branch/v17 with commit fbca5f0 Jan 8, 2026
42 checks passed
@ravicious ravicious deleted the r7s/v17/backport-62389-devicetrust-query-param branch January 8, 2026 10:45
@fheinecke fheinecke mentioned this pull request Jan 8, 2026
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.

4 participants