LiskArchive / lisk-ui

🖥️ Lisk user-interface submodule
https://lisk.io/
GNU General Public License v3.0
24 stars 35 forks source link

Use eqeqeq for user entered passphrase on registration #120

Closed toschdev closed 7 years ago

toschdev commented 7 years ago

Currently the passphrase check in Lisk-UI might contain an error of the user inserted passphrase.

The code, where $scope.newPassphrase is the 12 word mnemonic generated passphrase and pass is user inserted passphrase.

Javascript == operator might not check properly, === or in this case !== should be used.

if (!Mnemonic.isValid(pass) || $scope.newPassphrase != pass) {
    $scope.noMatch = true;
}