diff options
author | 2020-05-03 16:07:02 +0200 | |
---|---|---|
committer | 2020-05-03 16:07:02 +0200 | |
commit | 2f28ec495d5ba2f9368020391dd52da16ed008cd (patch) | |
tree | b49b8186c578140bb860c5bf95c0177757b16178 /src/containers/auth | |
parent | Create SECURITY.md (#705) (diff) | |
download | ferdium-app-2f28ec495d5ba2f9368020391dd52da16ed008cd.tar.gz ferdium-app-2f28ec495d5ba2f9368020391dd52da16ed008cd.tar.zst ferdium-app-2f28ec495d5ba2f9368020391dd52da16ed008cd.zip |
Add password hashing to lock password (#694)
Diffstat (limited to 'src/containers/auth')
-rw-r--r-- | src/containers/auth/LockedScreen.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/containers/auth/LockedScreen.js b/src/containers/auth/LockedScreen.js index 8f6ce85c3..a04107072 100644 --- a/src/containers/auth/LockedScreen.js +++ b/src/containers/auth/LockedScreen.js | |||
@@ -4,6 +4,8 @@ import { inject, observer } from 'mobx-react'; | |||
4 | import Locked from '../../components/auth/Locked'; | 4 | import Locked from '../../components/auth/Locked'; |
5 | import SettingsStore from '../../stores/SettingsStore'; | 5 | import SettingsStore from '../../stores/SettingsStore'; |
6 | 6 | ||
7 | import { hash } from '../../helpers/password-helpers'; | ||
8 | |||
7 | export default @inject('stores', 'actions') @observer class LockedScreen extends Component { | 9 | export default @inject('stores', 'actions') @observer class LockedScreen extends Component { |
8 | state = { | 10 | state = { |
9 | error: false, | 11 | error: false, |
@@ -24,7 +26,7 @@ export default @inject('stores', 'actions') @observer class LockedScreen extends | |||
24 | correctPassword = ''; | 26 | correctPassword = ''; |
25 | } | 27 | } |
26 | 28 | ||
27 | if (String(password) === String(correctPassword)) { | 29 | if (hash(String(password)) === String(correctPassword)) { |
28 | this.props.actions.settings.update({ | 30 | this.props.actions.settings.update({ |
29 | type: 'app', | 31 | type: 'app', |
30 | data: { | 32 | data: { |