aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-05-03 16:07:02 +0200
committerLibravatar GitHub <noreply@github.com>2020-05-03 16:07:02 +0200
commit2f28ec495d5ba2f9368020391dd52da16ed008cd (patch)
treeb49b8186c578140bb860c5bf95c0177757b16178 /src/containers/auth
parentCreate SECURITY.md (#705) (diff)
downloadferdium-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.js4
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';
4import Locked from '../../components/auth/Locked'; 4import Locked from '../../components/auth/Locked';
5import SettingsStore from '../../stores/SettingsStore'; 5import SettingsStore from '../../stores/SettingsStore';
6 6
7import { hash } from '../../helpers/password-helpers';
8
7export default @inject('stores', 'actions') @observer class LockedScreen extends Component { 9export 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: {