master
Aevann1 2022-02-04 10:59:12 +02:00
parent 52a50796a0
commit 5ade054494
6 changed files with 7 additions and 25 deletions

View File

@ -71,10 +71,6 @@ def get_account(id, v=None):
user = g.db.query(User).filter_by(id = id).one_or_none()
if not user:
try: id = int(str(id), 36)
except: abort(404)
user = g.db.query(User).filter_by(id = id).one_or_none()
if not user: abort(404)
if v:

View File

@ -34,8 +34,6 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
if v and request.path.startswith('/logged_out'): v = None
try: cid = int(cid)
except:
try: cid = int(cid, 36)
except: abort(404)
comment = get_comment(cid, v=v)

View File

@ -110,8 +110,6 @@ def post_id(pid, anything=None, v=None):
try: pid = int(pid)
except:
try: pid = int(pid, 36)
except: abort(404)
post = get_post(pid, v=v)

View File

@ -237,17 +237,11 @@ def log(v):
def log_item(id, v):
try: id = int(id)
except:
try: id = int(id, 36)
except: abort(404)
action=g.db.query(ModAction).filter_by(id=id).one_or_none()
if not action:
abort(404)
if request.path != action.permalink:
return redirect(action.permalink)
if not action: abort(404)
admins = [x[0] for x in g.db.query(User.username).filter(User.admin_level > 1).all()]

View File

@ -967,8 +967,6 @@ def user_profile_uid(v, id):
if v and request.path.startswith('/logged_out'): v = None
try: id = int(id)
except:
try: id = int(id, 36)
except: abort(404)
x=get_account(id)
return redirect(x.profile_url)

View File

@ -138,8 +138,6 @@ def api_vote_comment(comment_id, new, v):
new = int(new)
try: comment_id = int(comment_id)
except:
try: comment_id = int(comment_id, 36)
except: abort(404)
comment = get_comment(comment_id)