reduce pw size
parent
bea43095ec
commit
948729e2d3
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue