salt the hashes

This commit is contained in:
Ville Rantanen
2018-02-27 18:53:56 +02:00
parent 09bdb028dd
commit 9ed8c18fb3
4 changed files with 7 additions and 7 deletions

View File

@@ -101,7 +101,7 @@ def add_share(shares, config, opts):
if opts.password:
if opts.plain:
share['pass_plain'] = opts.password
share['pass_hash'] = password_hash(opts.password)
share['pass_hash'] = password_hash(opts.password, config['app_secret_key'])
if opts.expire:
try:
date_object = datetime.strptime(opts.expire,"%Y-%m-%d %H:%M")
@@ -165,7 +165,7 @@ def modify_share(shares, config, opts):
# ADD/Change a password
if opts.plain:
share['pass_plain'] = opts.password
share['pass_hash'] = password_hash(opts.password)
share['pass_hash'] = password_hash(opts.password, config['app_secret_key'])
if opts.expire:
if opts.expire == "":