Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit af14000

Browse files
author
Andrew Schneider
authored
Merge pull request #1742 from blockchain/context-whitelist
feat(LinkContext): check that link context value is in whitelist
2 parents ee0275f + db07873 commit af14000

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/blockchain-wallet-v4-frontend/src/scenes/VerifyEmailToken

packages/blockchain-wallet-v4-frontend/src/scenes/VerifyEmailToken/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import Success from './template.success'
88
import Error from './template.error'
99
import { Wrapper } from 'components/Public'
1010

11+
const VALID_CONTEXTS = ['PIT_SIGNUP', 'KYC', 'SETTINGS']
12+
1113
class VerifyEmailToken extends React.PureComponent {
1214
state = {
1315
token: decodeURIComponent(
@@ -28,7 +30,9 @@ class VerifyEmailToken extends React.PureComponent {
2830
? 'https://blockchain.page.link/email_verified'
2931
: 'https://blockchainwalletstaging.page.link/email_verified'
3032

31-
return context != null ? `${link}?context=${context}` : link
33+
const isValidContext = VALID_CONTEXTS.indexOf(context) > -1
34+
35+
return isValidContext ? `${link}?context=${context}` : link
3236
}
3337

3438
render () {

0 commit comments

Comments
 (0)