Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Disallow upper case letters in passphrase
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Dec 19, 2017
1 parent 475707b commit 20373af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/passphraseInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class PassphraseInput extends React.Component {
return this.props.t('Passphrase should have 12 words, entered passphrase has {{length}}', { length: mnemonic.length });
}

const invalidWord = mnemonic.find(word => !inDictionary(word.toLowerCase()));
const invalidWord = mnemonic.find(word => !inDictionary(word));
if (invalidWord) {
if (invalidWord.length >= 2 && invalidWord.length <= 8) {
const validWord = findSimilarWord(invalidWord);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/passphrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const generatePassphrase = ({ seed }) => (new mnemonic(new Buffer(seed.jo
* @returns {bool} isValidPassphrase
*/
export const isValidPassphrase = (passphrase) => {
const normalizedValue = passphrase.replace(/ +/g, ' ').trim().toLowerCase();
const normalizedValue = passphrase.replace(/ +/g, ' ').trim();
let isValid;
try {
isValid = normalizedValue.split(' ').length >= 12 && mnemonic.isValid(normalizedValue);
Expand Down

0 comments on commit 20373af

Please sign in to comment.