reduce pw size

pull/221/head
Aevann 2024-01-07 23:46:22 +02:00
parent bea43095ec
commit 948729e2d3
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import time
from math import floor
import os
import ffmpeg
from random import randint
from sqlalchemy.orm import load_only
@ -1935,7 +1936,7 @@ def delete_media_post(v):
@admin_level_required(PERMS['USER_RESET_PASSWORD'])
def admin_reset_password(user_id, v):
user = get_account(user_id)
new_password = secrets.token_urlsafe(39)
new_password = secrets.token_urlsafe(randint(27, 33))
user.passhash = hash_password(new_password)
g.db.add(user)