Revert "add ip alt linking for WPD"

This reverts commit 255eec8241.
master
Aevann 2024-02-11 08:40:30 +02:00
parent 624d79739b
commit d6581b3a6b
1 changed files with 0 additions and 13 deletions

View File

@ -13,10 +13,6 @@ from files.helpers.config.const import *
from files.helpers.security import generate_hash, validate_hash from files.helpers.security import generate_hash, validate_hash
from files.__main__ import cache from files.__main__ import cache
if FEATURES['IP_LOGGING']:
from files.classes import IPLog
from files.__main__ import get_IP
def check_session_id(): def check_session_id():
if not session.get("session_id"): if not session.get("session_id"):
session.permanent = True session.permanent = True
@ -88,15 +84,6 @@ def check_for_alts(current, include_current_session=False):
).all()] ).all()]
past_accs.update(more_ids) past_accs.update(more_ids)
if FEATURES['IP_LOGGING']:
one_day_ago = time.time() - 86400
more_ids = [x[0] for x in g.db.query(IPLog.user_id).filter(
IPLog.ip == get_IP(),
IPLog.user_id != current.id,
IPLog.last_used > one_day_ago,
).all()]
past_accs.update(more_ids)
for past_id in list(past_accs): for past_id in list(past_accs):
if past_id == current.id: continue if past_id == current.id: continue