From cb0392b78d8e84cf9bfeb39b444936adb692deb6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 29 Jan 2020 13:24:45 +0000 Subject: [PATCH 001/103] use forms to wrap password fields so Chrome doesn't go wild and prefill all the things Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../CreateSecretStorageDialog.js | 75 +++++++++---------- src/components/structures/SearchBox.js | 1 + .../AccessSecretStorageDialog.js | 45 +++++------ 3 files changed, 57 insertions(+), 64 deletions(-) diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index 4068f72217..35cd5aa819 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -295,31 +295,27 @@ export default class CreateSecretStorageDialog extends React.PureComponent { }); } - _onPassPhraseNextClick = () => { - this.setState({phase: PHASE_PASSPHRASE_CONFIRM}); - } - - _onPassPhraseKeyPress = async (e) => { - if (e.key === 'Enter') { - // If we're waiting for the timeout before updating the result at this point, - // skip ahead and do it now, otherwise we'll deny the attempt to proceed - // even if the user entered a valid passphrase - if (this._setZxcvbnResultTimeout !== null) { - clearTimeout(this._setZxcvbnResultTimeout); - this._setZxcvbnResultTimeout = null; - await new Promise((resolve) => { - this.setState({ - zxcvbnResult: scorePassword(this.state.passPhrase), - }, resolve); - }); - } - if (this._passPhraseIsValid()) { - this._onPassPhraseNextClick(); - } + _onPassPhraseNextClick = async () => { + // If we're waiting for the timeout before updating the result at this point, + // skip ahead and do it now, otherwise we'll deny the attempt to proceed + // even if the user entered a valid passphrase + if (this._setZxcvbnResultTimeout !== null) { + clearTimeout(this._setZxcvbnResultTimeout); + this._setZxcvbnResultTimeout = null; + await new Promise((resolve) => { + this.setState({ + zxcvbnResult: scorePassword(this.state.passPhrase), + }, resolve); + }); } - } + if (this._passPhraseIsValid()) { + this.setState({phase: PHASE_PASSPHRASE_CONFIRM}); + } + }; _onPassPhraseConfirmNextClick = async () => { + if (this.state.passPhrase !== this.state.passPhraseConfirm) return; + const [keyInfo, encodedRecoveryKey] = await MatrixClientPeg.get().createRecoveryKeyFromPassphrase(this.state.passPhrase); this._keyInfo = keyInfo; @@ -332,12 +328,6 @@ export default class CreateSecretStorageDialog extends React.PureComponent { }); } - _onPassPhraseConfirmKeyPress = (e) => { - if (e.key === 'Enter' && this.state.passPhrase === this.state.passPhraseConfirm) { - this._onPassPhraseConfirmNextClick(); - } - } - _onSetAgainClick = () => { this.setState({ passPhrase: '', @@ -407,7 +397,8 @@ export default class CreateSecretStorageDialog extends React.PureComponent { } else if (this.state.canUploadKeysWithPasswordOnly) { authPrompt =
{_t( "Warning: You should only set up key backup from a trusted computer.", {}, { b: sub => {sub} }, @@ -316,7 +306,6 @@ export default class CreateKeyBackupDialog extends React.PureComponent {
{_t( "Please enter your passphrase a second time to confirm.", )}
@@ -382,7 +373,6 @@ export default class CreateKeyBackupDialog extends React.PureComponent {/help
to list available commands. Did you mean to send this as a message?": "Můžete použít /help
na vypsání všech příkazů. Nebo jste text chtěli odeslat jako zprávu?",
+ "Hint: Begin your message with //
to start it with a slash.": "Tip: Zprávu můžete začít //
, pokud chcete aby začínala lomítkem.",
+ "Send as message": "Odeslat jako zprávu",
+ "Waiting for %(displayName)s to accept…": "Čekáme, než %(displayName)s přijme…",
+ "Start Verification": "Začít s verifikací",
+ "Your messages are secured and only you and the recipient have the unique keys to unlock them.": "Vaše zprávy jsou zabezpečené - pouze Vy a příjemce mají klíče k jejich přečtení.",
+ "Verify User": "Ověřit uživatele",
+ "For extra security, verify this user by checking a one-time code on both of your devices.": "Pro lepší bezpečnost, ověřte uživatele zkontrolováním jednorázového kódu na vašich zařízeních.",
+ "Your messages are not secure": "Vaše zprávy nejsou zabezpečené",
+ "One of the following may be compromised:": "Něco z následujích věcí může být kompromitováno:",
+ "Your homeserver": "Váš domovský server",
+ "The homeserver the user you’re verifying is connected to": "Domovský server ověřovaného uživatele",
+ "Yours, or the other users’ internet connection": "Vaše připojení k internetu a nebo připojení ověřovaného uživatele",
+ "Yours, or the other users’ session": "Vaše relace a nebo relace ověřovaného uživatele",
+ "%(count)s sessions|other": "%(count)s relací",
+ "%(count)s sessions|one": "%(count)s relace",
+ "Hide sessions": "Skrýt relace",
+ "Verify by emoji": "Ověřit emotikonami",
+ "Verify by comparing unique emoji.": "Oveření porovnáním několika emotikon."
}
From 05fc6c11b0fd02d3f3d2568c17c5340a5c33f53e Mon Sep 17 00:00:00 2001
From: "J. A. Durieux" /help
to list available commands. Did you mean to send this as a message?": "Type /help
om alle opdrachten te zien. Was het uw bedoeling dit als bericht te sturen?",
- "Help": "Hulp"
+ "Help": "Hulp",
+ "Set up encryption": "Versleuteling instellen",
+ "Unverified session": "Ongeverifieerde sessie",
+ "This action requires accessing the default identity server @bot:*
would ignore all users that have the name 'bot' on any server.": "Geef hier te negeren gebruikers en servers in. Asterisken staan voor willekeurige tekenreeksen; zo leidt @bot:*
tot het negeren van gebruikers die 'bot' heten op alle servers."
}
From a6dd0d01e4fe11a24cc64b635e2c0e5393874252 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20C?= + {_t( + "Deleting cross-signing keys is permanent. " + + "Anyone you have verified with will see security alerts. " + + "You almost certainly don't want to do this, unless " + + "you've lost every device you can cross-sign from." + )} +
+
{_t(
From e016cbeffff7c2a30e9b6169372c726f6eb7e8b3 Mon Sep 17 00:00:00 2001
From: Bruno Windels {_t("%(name)s (%(userId)s) signed in to a new session without verifying it:", {name: member.displayName, userId})} {device.getDisplayName()} ({device.deviceId}) {_t("Ask this user to verify their session, or manually verify it below.")} {_t(
"Warning: You should only set up key backup from a trusted computer.", {},
{ b: sub => {sub} },
@@ -320,15 +325,14 @@ export default class CreateKeyBackupDialog extends React.PureComponent {
primaryButton={_t('Next')}
onPrimaryButtonClick={this._onPassPhraseNextClick}
hasCancel={false}
- primaryIsSubmit={true}
disabled={!this._passPhraseIsValid()}
/>
{_t("Advanced")}
-
+
{_t( "Please enter your passphrase a second time to confirm.", )}
@@ -384,7 +388,6 @@ export default class CreateKeyBackupDialog extends React.PureComponent { primaryButton={_t('Next')} onPrimaryButtonClick={this._onPassPhraseConfirmNextClick} hasCancel={false} - primaryIsSubmit={true} disabled={this.state.passPhrase !== this.state.passPhraseConfirm} />{_t( "Set up encryption on this session to allow it to verify other sessions, " + "granting them access to encrypted messages and marking them as trusted for other users.", @@ -495,7 +495,6 @@ export default class CreateSecretStorageDialog extends React.PureComponent { onPrimaryButtonClick={this._onPassPhraseNextClick} hasCancel={false} disabled={!this._passPhraseIsValid()} - primaryIsSubmit={true} >
-@bot:*
would ignore all users that have the name 'bot' on any server.": "Geef hier te negeren gebruikers en servers in. Asterisken staan voor willekeurige tekenreeksen; zo leidt @bot:*
tot het negeren van gebruikers die 'bot' heten op alle servers."
+ "Add users and servers you want to ignore here. Use asterisks to have Riot match any characters. For example, @bot:*
would ignore all users that have the name 'bot' on any server.": "Geef hier te negeren gebruikers en servers in. Asterisken staan voor willekeurige tekenreeksen; zo leidt @bot:*
tot het negeren van gebruikers die 'bot' heten op alle servers.",
+ "in memory": "in het geheugen",
+ "not found": "niet gevonden",
+ "Your homeserver does not support session management.": "Uw thuisserver ondersteunt geen sessiebeheer.",
+ "Unable to load session list": "Kan sessielijst niet laden",
+ "Delete %(count)s sessions|other": "Verwijder %(count)s sessies",
+ "Delete %(count)s sessions|one": "Verwijder %(count)s sessie"
}
From 23536a7e35709d74a6d40503a60e4b9b252091a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?K=C3=A9vin=20C?= {_t("Scan this unique code")}
+ {qrCode} +{_t("Compare unique emoji")}
+ {_t("Compare a unique set of emoji if you don't have a camera on either device")} +{_t("Scan this unique code")}
{qrCode} - {_t("or")} +{_t("Compare unique emoji")}
- {_t("Compare a unique set of emoji if you don't have a camera on either device")} + {_t("Compare a unique set of emoji if you don't have a camera on either device")}{_t("Scan this unique code")}
+ {qrCode} +{_t("Compare unique emoji")}
+ {_t("Compare a unique set of emoji if you don't have a camera on either device")} +{_t("Scan this unique code")}
{qrCode}{_t("Compare unique emoji")}
- {_t("Compare a unique set of emoji if you don't have a camera on either device")} + {_t("Compare a unique set of emoji if you don't have a camera on either device")}{_t("Verify by comparing unique emoji.")}
- { button }{_t("Ask %(displayName)s to scan your code:", { displayName: member.displayName || member.name || member.userId, })}
@@ -132,7 +131,7 @@ export default class VerificationPanel extends React.PureComponent {{_t("If you can't scan the code above, verify by comparing unique emoji.")}
{ button } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 18df6dc70f..97e2a7cb5b 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1192,6 +1192,7 @@ "Security": "Security", "Verify by emoji": "Verify by emoji", "Verify by comparing unique emoji.": "Verify by comparing unique emoji.", + "Verify by scanning": "Verify by scanning", "Ask %(displayName)s to scan your code:": "Ask %(displayName)s to scan your code:", "If you can't scan the code above, verify by comparing unique emoji.": "If you can't scan the code above, verify by comparing unique emoji.", "You've successfully verified %(displayName)s!": "You've successfully verified %(displayName)s!", From a693af0c6b2ac24798c8fdadc7f8304ccbaf2f5e Mon Sep 17 00:00:00 2001 From: Bruno Windels{_t("Compare unique emoji")}
{_t("Compare a unique set of emoji if you don't have a camera on either device")} -{_t("You've successfully verified %(displayName)s!", { displayName: member.displayName || member.name || member.userId, })}
-Verify all users in a room to ensure it's secure.
{_t("You've successfully verified %(displayName)s!", { displayName: member.displayName || member.name || member.userId, })}
-Verify all users in a room to ensure it's secure.