You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
release(runway): cherry-pick fix: cp-13.10.4 parse signed deep links with empty sig_params correctly (#38269)
- fix: cp-13.10.4 parse signed deep links with empty `sig_params`
correctly (#38142)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
In previous versions, this link would not verify:
https://link.metamask.io/home?sig_params=&sig=OHXtQkiw6eH0yxVZb3wFabCEahlcimocFuh8I90u2nEF2Ats3ETf_fQ2qO4zEx8PYr5CXzU0PQFEOgXuGpmHvQ&utm_medium=github
Now it does.
[](https://codespaces.new/MetaMask/metamask-extension/pull/38142?quickstart=1)
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: signed deep links with empty `sig_params` with extra
params as valid
<!--
## **Related issues**
Fixes:
## **Manual testing steps**
1. Go to this page...
2.
3.
## **Screenshots/Recordings**
### **Before**
### **After**
-->
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Handle empty `sig_params` in deep-link canonicalization/parsing and
add a gated `/test` route with updated tests and helpers.
>
> - **Deep links**:
> - Canonicalization: Treat `sig_params` as present even when empty;
preserve only listed params (none if empty), always append `sig_params`,
and keep URL immutable.
> - Parsing: Remove `sig_params` before invoking handlers; enforce
filtering to only listed params.
> - **Routes**:
> - Add `DEVELOPER_OPTIONS_ROUTE` export and a gated `/test` route
(enabled in tests/dev options) that forwards query params.
> - **E2E/Tests**:
> - Add/expand unit and e2e tests for empty `sig_params` and param
filtering; switch relevant tests to `/test` route.
> - Helpers: `signDeepLink` now always appends `sig_params` (possibly
empty); simplify `getHashParams` parsing.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2f054e9. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[8b80bc2](8b80bc2)
Co-authored-by: David Murdoch <[email protected]>
0 commit comments