mirror of https://github.com/vector-im/riot-web
Merge pull request #2425 from matrix-org/dbkr/createbackup_niggles_2
Set backup niggles: 2pull/21833/head
commit
a691c0492a
|
@ -296,14 +296,22 @@ export default React.createClass({
|
||||||
_renderPhasePassPhraseConfirm: function() {
|
_renderPhasePassPhraseConfirm: function() {
|
||||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
|
|
||||||
|
let matchText;
|
||||||
|
if (this.state.passPhraseConfirm === this.state.passPhrase) {
|
||||||
|
matchText = _t("That matches!");
|
||||||
|
} else if (!this.state.passPhrase.startsWith(this.state.passPhraseConfirm)) {
|
||||||
|
// only tell them they're wrong if they've actually gone wrong.
|
||||||
|
// Security concious readers will note that if you left riot-web unattended
|
||||||
|
// on this screen, this would make it easy for a malicious person to guess
|
||||||
|
// your passphrase one letter at a time, but they could get this faster by
|
||||||
|
// just opening the browser's developer tools and reading it.
|
||||||
|
// Note that not having typed anything at all will not hit this clause and
|
||||||
|
// fall through so empty box === no hint.
|
||||||
|
matchText = _t("That doesn't match.");
|
||||||
|
}
|
||||||
|
|
||||||
let passPhraseMatch = null;
|
let passPhraseMatch = null;
|
||||||
if (this.state.passPhraseConfirm.length > 0) {
|
if (matchText) {
|
||||||
let matchText;
|
|
||||||
if (this.state.passPhraseConfirm === this.state.passPhrase) {
|
|
||||||
matchText = _t("That matches!");
|
|
||||||
} else {
|
|
||||||
matchText = _t("That doesn't match.");
|
|
||||||
}
|
|
||||||
passPhraseMatch = <div className="mx_CreateKeyBackupDialog_passPhraseMatch">
|
passPhraseMatch = <div className="mx_CreateKeyBackupDialog_passPhraseMatch">
|
||||||
<div>{matchText}</div>
|
<div>{matchText}</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in New Issue