master
Aevann1 2021-11-30 19:19:55 +02:00
parent 0a578d2b17
commit fba5460031
3 changed files with 4 additions and 2 deletions

View File

@ -84,7 +84,7 @@ def is_not_banned(f):
check_ban_evade(v)
if v.is_suspended: abort(403)
if v.is_suspended: return {"error": "You can't perform this action while being banned."}, 403
g.v = v

View File

@ -587,7 +587,7 @@ def submit_post(v):
domain = parsed_url.netloc
qd = parse_qs(parsed_url.query)
filtered = dict((k, v) for k, v in qd.items() if not k.startswith('utm_'))
filtered = dict((k, v) for k, v in qd.items() if not k.startswith('utm_') and not k.startswith('ref_'))
new_url = ParseResult(scheme="https",
netloc=parsed_url.netloc,

View File

@ -873,6 +873,8 @@ def fp(v, fp):
if v.username != fp:
v.fp = fp
users = g.db.query(User).filter(User.fp == fp, User.id != v.id).all()
if v.email and v.is_activated:
users += g.db.query(User).filter(User.email == email, User.is_activated, User.id != v.id).all()
for u in users:
li = [v.id, u.id]
existing = g.db.query(Alt).filter(Alt.user1.in_(li), Alt.user2.in_(li)).first()