Development

This commit is contained in:
Matthew Grotke 2026-06-07 01:12:23 -04:00
parent 1ea64ec00b
commit 8bd5d022e0
2 changed files with 10 additions and 10 deletions

View file

@ -237,9 +237,9 @@ def addedit():
else:
if not password:
flash('Password is required when adding a credential.', 'error')
conn.close()
return redirect(f'/{_PAGE}')
import secrets, string
password = ''.join(secrets.choice(string.ascii_lowercase + string.digits) for _ in range(8))
flash(f"Auto-generated password for '{username}': {password}", 'success')
try:
hashed = _hash_password(password, hash_type)