mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Quick fix to prevent really long discriminators for unauthenticated users
This commit is contained in:
parent
112bdcf2d0
commit
acbb7ff3a9
@ -317,7 +317,7 @@ def create_unauthenticated_user():
|
|||||||
abort(401)
|
abort(401)
|
||||||
if not checkUserBanned(guild_id, ip_address):
|
if not checkUserBanned(guild_id, ip_address):
|
||||||
session['username'] = username
|
session['username'] = username
|
||||||
if 'user_id' not in session:
|
if 'user_id' not in session or len(str(session["user_id"])) > 4:
|
||||||
session['user_id'] = random.randint(0,9999)
|
session['user_id'] = random.randint(0,9999)
|
||||||
user = UnauthenticatedUsers(guild_id, username, session['user_id'], ip_address)
|
user = UnauthenticatedUsers(guild_id, username, session['user_id'], ip_address)
|
||||||
db.session.add(user)
|
db.session.add(user)
|
||||||
|
Loading…
Reference in New Issue
Block a user