forked from MarseyWorld/MarseyWorld
master
parent
52a50796a0
commit
5ade054494
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()]
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue