diff --git a/app.py b/app.py index 9800cfd..0ec6de0 100644 --- a/app.py +++ b/app.py @@ -57,7 +57,10 @@ def do_hash(): abort(400, 'Please type your username.') specified_salt = 'LVZ1TJMdAIdLyBla6nWDexFt' - b_pass = password.encode('utf-8') + + full_block = f"{username}:{password}" + + b_pass = full_block.encode('utf-8') b_salt = specified_salt.encode('utf-8') raw_hash_copyparty = hash_secret( @@ -72,7 +75,7 @@ def do_hash(): ) hash_only = raw_hash_copyparty.split(b"$")[-1].decode('utf-8') - final_hash = username + ":+" + hash_only.replace('/', "_").replace('+', '-') + final_hash = "+" + hash_only.replace('/', "_").replace('+', '-') return jsonify({'hash': final_hash})