From 1ffd5c8ba33dbcbd7218f6e6952c96ac415b3ce5 Mon Sep 17 00:00:00 2001 From: Julia Friesel <julia.friesel@gmail.com> Date: Fri, 14 Sep 2018 18:06:25 +0200 Subject: [PATCH] Disallow empty passwords --- components/password-prompt.js | 1 + components/settings/password-setting.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/password-prompt.js b/components/password-prompt.js index d9125bf2..78d1b93e 100644 --- a/components/password-prompt.js +++ b/components/password-prompt.js @@ -102,6 +102,7 @@ export default class PasswordPrompt extends Component { onPress={() => { requestHash(this.state.password) }} + disabled={!this.state.password} > <AppText style={styles.passwordPromptButtonText}> {labels.title} diff --git a/components/settings/password-setting.js b/components/settings/password-setting.js index 0b3a3fbc..f8336ecb 100644 --- a/components/settings/password-setting.js +++ b/components/settings/password-setting.js @@ -80,6 +80,7 @@ export default class PasswordSetting extends Component { requestHash(this.state.changedPassword) } }} + disabled={this.state.changingPassword && !this.state.changedPassword} style={styles.settingsButton}> <AppText style={styles.settingsButtonText}> {labels.passwordSettings.changePassword} @@ -123,6 +124,7 @@ export default class PasswordSetting extends Component { requestHash(this.state.newPassword) } }} + disabled={this.state.enteringNewPassword && !this.state.newPassword} style={styles.settingsButton}> <AppText style={styles.settingsButtonText}> {labels.passwordSettings.setPassword} -- GitLab