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

Prevent accidental search of user's passphrase #1813

Closed
slaweet opened this issue Mar 11, 2019 · 1 comment
Closed

Prevent accidental search of user's passphrase #1813

slaweet opened this issue Mar 11, 2019 · 1 comment

Comments

@slaweet
Copy link
Contributor

slaweet commented Mar 11, 2019

Currently, a user can paste accidentally passphrase into the search field and it will be used as a search term and sent to a server.

This should be avoided by not making the API request for delegate name if entered search term doesn't match the delegate name regex https://github.com/LiskHQ/lisk-hub/blob/93c9b0a386e47c258ff4ed77a8ad576aa720b0f5/src/components/registerDelegate/steps/choose/choose.js#L22 This will solve the problem because a delegate name doesn't allow spaces and passphrase require spaces, so there is an empty intersection of the two.

BTW the delegate name regex should be defined in this file https://github.com/LiskHQ/lisk-hub/blob/development/src/utils/regex.js and then the regex can be handled same as for Lisk ID and TxID in https://github.com/LiskHQ/lisk-hub/blob/93c9b0a386e47c258ff4ed77a8ad576aa720b0f5/src/utils/api/search.js#L44-L48

@osvaldovega
Copy link
Contributor

issue fixed in PR #1864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants