We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 955ae70 commit 0ee1c93Copy full SHA for 0ee1c93
editor.py
@@ -30,7 +30,7 @@
30
ROOT = '/var/www/public/'
31
HOME = '/'
32
from crypt import crypt
33
- PASSWD_FILE = '/etc/passwd'
+ PASSWD_FILE = '/etc/shadow'
34
CONFIG_FILE = '/var/www/editor/static/editor.conf'
35
IFCONFIG = 'ifconfig'
36
# End environment definitions
@@ -118,8 +118,8 @@ def auth():
118
# Validate password
119
pw = request.form['password']
120
hash = get_hash('root')
121
- salt = hash[0:2]
122
- if crypt(pw, salt) == hash:
+ salt = hash[3:11]
+ if crypt(pw, '$6$' + salt) == hash:
123
if login_user(USER_NAMES['rascal']):
124
flash('Logged in!')
125
return redirect(request.args.get('next') or '/')
0 commit comments