From 514d6ec1264741db50b462af96ee14dfb1d41780 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 9 Mar 2022 03:44:53 +0200 Subject: [PATCH] right --- files/classes/user.py | 8 +++- files/helpers/const.py | 19 ++++++---- files/helpers/jinja2.py | 2 +- files/helpers/sanitize.py | 20 +++++----- files/routes/awards.py | 4 +- files/routes/comments.py | 27 +++++++------- files/routes/front.py | 2 +- files/routes/login.py | 5 ++- files/routes/posts.py | 24 ++++++++---- files/routes/subs.py | 47 ++++-------------------- files/routes/users.py | 8 ++-- files/routes/votes.py | 2 +- files/templates/comments.html | 8 ++-- files/templates/post_actions.html | 2 +- files/templates/post_actions_mobile.html | 2 +- files/templates/sub/exilees.html | 9 +++++ files/templates/submission.html | 12 +++--- files/templates/submission_listing.html | 19 +++++----- files/templates/votes.html | 1 + 19 files changed, 111 insertions(+), 110 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index d01dd7cc9..815190df4 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -477,11 +477,15 @@ class User(Base): @property @lazy def profile_url(self): - if self.agendaposter: return f"{SITE_FULL}/static/assets/images/defaultpictures/agendaposter/{random.randint(1, 51)}.webp?v=1008" + if self.agendaposter: return f"/e/marseychud.webp" if self.profileurl: if self.profileurl.startswith('/'): return SITE_FULL + self.profileurl return self.profileurl - if SITE_NAME == 'Drama': return f"{SITE_FULL}/static/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=1008" + if SITE_NAME == 'Drama': + self.profileurl = '/e/' + random.choice(marseys_const) + '.webp' + g.db.add(self) + g.db.commit() + return self.profileurl return f"{SITE_FULL}/static/assets/images/default-profile-pic.webp?v=1008" @lazy diff --git a/files/helpers/const.py b/files/helpers/const.py index eb82809fe..1a6424755 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -128,7 +128,7 @@ if SITE in {'rdrama.net','devrama.xyz'}: A_ID = 1230 KIPPY_ID = 7150 - TAX_NOTIF_ID = 995 + GIFT_NOTIF_ID = 995 PIZZASHILL_ID = 2424 HIL_ID = 4245 CRAT_ID = 747 @@ -160,7 +160,7 @@ elif SITE == "pcmemes.net": A_ID = 0 KIPPY_ID = 1592 PIZZASHILL_ID = 0 - TAX_NOTIF_ID = 1592 + GIFT_NOTIF_ID = 1592 HIL_ID = 0 CRAT_ID = 0 IDIO_ID = 0 @@ -190,7 +190,7 @@ else: A_ID = 0 KIPPY_ID = 0 - TAX_NOTIF_ID = 9 + GIFT_NOTIF_ID = 9 PIZZASHILL_ID = 0 HIL_ID = 0 CRAT_ID = 0 @@ -634,7 +634,8 @@ dues = int(environ.get("DUES").strip()) christian_emojis = (':#marseyjesus:',':#marseyimmaculate:',':#marseymothermary:',':#marseyfatherjoseph:',':#gigachadorthodox:',':#marseyorthodox:',':#marseyorthodoxpat:') db = db_session() -marseys_const = [x[0] for x in db.query(Marsey.name).all()] + ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','exclamationpoint','period','questionmark'] +marseys_const = [x[0] for x in db.query(Marsey.name).filter(Marsey.name!='marseychud').all()] +marseys_const2 = marseys_const + ['marseychud','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','exclamationpoint','period','questionmark'] db.close() if SITE_NAME == 'PCM': @@ -648,9 +649,11 @@ else: valid_password_regex = re.compile("^.{8,100}$", flags=re.A) -marsey_regex = re.compile("^(:[!#A-Za-z0-9]{1,30}?:\s*)+$", flags=re.A) +marseyaward_body_regex = re.compile(">[^<\s+]|[^>\s+]<", flags=re.A) -marsey_regex2 = re.compile("[a-z0-9]{1,30}", flags=re.A) +marseyaward_title_regex = re.compile("(]+>)+", flags=re.A) + +marsey_regex = re.compile("[a-z0-9]{1,30}", flags=re.A) image_regex = re.compile("(^https:\/\/.*\.(png|jpg|jpeg|gif|webp|maxwidth=9999|fidelity=high)($|\s))", flags=re.I|re.M|re.A) @@ -715,4 +718,6 @@ def torture_ap(body, username): body = torture_regex2.sub(rf'\1@{username} is ', body) return body -YOUTUBE_KEY = environ.get("YOUTUBE_KEY", "").strip() \ No newline at end of file +YOUTUBE_KEY = environ.get("YOUTUBE_KEY", "").strip() + +ADMIGGERS = (37696,37697,37749,37833,37838) \ No newline at end of file diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index 415f71e9f..46fa95a40 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -16,4 +16,4 @@ def post_embed(id, v): @app.context_processor def inject_constants(): - return {"environ":environ, "SITE":SITE, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS} \ No newline at end of file + return {"environ":environ, "SITE":SITE, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS, "ADMIGGERS":ADMIGGERS} \ No newline at end of file diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index e71be6a9e..65be0a660 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -233,9 +233,9 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): classes = 'emoji-md' remoji = emoji - if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const): classes += ' golden' + if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const2): classes += ' golden' - if remoji == 'marseyrandom': remoji = choice(marseys_const) + if remoji == 'marseyrandom': remoji = choice(marseys_const2) if path.isfile(f'files/assets/images/emojis/{remoji}.webp'): new = re.sub(f'(?', new, flags=re.I|re.A) @@ -255,10 +255,10 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): if emoji.startswith("!"): emoji = emoji[1:] classes = 'emoji mirrored' - if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const): classes += ' golden' + if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const2): classes += ' golden' old = emoji - if emoji == 'marseyrandom': emoji = choice(marseys_const) + if emoji == 'marseyrandom': emoji = choice(marseys_const2) else: emoji = old if path.isfile(f'files/assets/images/emojis/{emoji}.webp'): @@ -266,10 +266,10 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): if comment: marseys_used.add(emoji) else: classes = 'emoji' - if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const): classes += ' golden' + if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const2): classes += ' golden' old = emoji - if emoji == 'marseyrandom': emoji = choice(marseys_const) + if emoji == 'marseyrandom': emoji = choice(marseys_const2) else: emoji = old if path.isfile(f'files/assets/images/emojis/{emoji}.webp'): @@ -345,10 +345,10 @@ def filter_emojis_only(title, edit=False, graceful=False): if emoji.startswith("!"): emoji = emoji[1:] classes = 'emoji mirrored' - if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const): classes += ' golden' + if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const2): classes += ' golden' old = emoji - if emoji == 'marseyrandom': emoji = choice(marseys_const) + if emoji == 'marseyrandom': emoji = choice(marseys_const2) else: emoji = old if path.isfile(f'files/assets/images/emojis/{emoji}.webp'): @@ -356,10 +356,10 @@ def filter_emojis_only(title, edit=False, graceful=False): else: classes = 'emoji' - if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const): classes += ' golden' + if not edit and random() < 0.0025 and ('marsey' in emoji or emoji in marseys_const2): classes += ' golden' old = emoji - if emoji == 'marseyrandom': emoji = choice(marseys_const) + if emoji == 'marseyrandom': emoji = choice(marseys_const2) else: emoji = old if path.isfile(f'files/assets/images/emojis/{emoji}.webp'): diff --git a/files/routes/awards.py b/files/routes/awards.py index bda8b1e50..f66e45263 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -260,7 +260,7 @@ def award_post(pid, v): author.ban_reason = f"grass award used by @{v.username} on /post/{post.id}" author.unban_utc = int(time.time()) + 30 * 86400 link = f"[this post]({post.shortlink})" - send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!") + send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!") elif kind == "pin": if post.stickied and post.stickied_utc: post.stickied_utc += 3600 @@ -486,7 +486,7 @@ def award_comment(cid, v): author.ban_reason = f"grass award used by @{v.username} on /comment/{c.id}" author.unban_utc = int(time.time()) + 30 * 86400 link = f"[this comment]({c.shortlink})" - send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!") + send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!") elif kind == "pin": if c.is_pinned and c.is_pinned_utc: c.is_pinned_utc += 3600 else: diff --git a/files/routes/comments.py b/files/routes/comments.py index 22fc9802e..1106daff4 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -210,10 +210,7 @@ def api_comment(v): with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f: f.write('\n{[para]}\n' + body) - if v.marseyawarded and parent_post.id not in (37696,37697,37749,37833,37838): - if not marsey_regex.fullmatch(body): return {"error":"You can only type marseys!"}, 403 - - if parent_post.id not in (37696,37697,37749,37833,37838): + if parent_post.id not in ADMIGGERS: if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')): return {"error":"You have to type more than 280 characters!"}, 403 elif v.bird and len(body) > 140: @@ -272,7 +269,7 @@ def api_comment(v): marsey = loads(body.lower()) name = marsey["name"] - if not marsey_regex2.fullmatch(name): + if not marsey_regex.fullmatch(name): return {"error": "Invalid name!"}, 403 if "author" in marsey: user = get_user(marsey["author"]) @@ -332,7 +329,7 @@ def api_comment(v): body += f"\n\n{url}" else: return {"error": "Image/Video files only"}, 400 - if v.agendaposter and not v.marseyawarded and parent_post.id not in (37696,37697,37749,37833,37838): + if v.agendaposter and not v.marseyawarded and parent_post.id not in ADMIGGERS: body = torture_ap(body, v.username) if '#fortune' in body: @@ -341,6 +338,9 @@ def api_comment(v): body_html = sanitize(body, comment=True) + if v.marseyawarded and parent_post.id not in ADMIGGERS and marseyaward_body_regex.search(body_html): + return {"error":"You can only type marseys!"}, 403 + bans = filter_comment_html(body_html) if bans: @@ -349,7 +349,7 @@ def api_comment(v): if ban.reason: reason += f" {ban.reason}" return {"error": reason}, 401 - if parent_post.id not in (37696,37697,37749,37833,37838) and '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and AGENDAPOSTER_PHRASE not in body.lower(): + if parent_post.id not in ADMIGGERS and '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and AGENDAPOSTER_PHRASE not in body.lower(): existing = g.db.query(Comment.id).filter(Comment.author_id == v.id, Comment.deleted_utc == 0, Comment.parent_comment_id == parent_comment_id, @@ -363,7 +363,7 @@ def api_comment(v): is_bot = bool(request.headers.get("Authorization")) - if '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and parent_post.id not in (37696,37697,37749,37833,37838) and not is_bot and not v.marseyawarded and AGENDAPOSTER_PHRASE not in body.lower() and len(body) > 10: + if '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and parent_post.id not in ADMIGGERS and not is_bot and not v.marseyawarded and AGENDAPOSTER_PHRASE not in body.lower() and len(body) > 10: now = int(time.time()) cutoff = now - 60 * 60 * 24 @@ -477,7 +477,7 @@ def api_comment(v): n = Notification(comment_id=c_based.id, user_id=v.id) g.db.add(n) - if parent_post.id not in (37696,37697,37749,37833,37838): + if parent_post.id not in ADMIGGERS: if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower(): c.is_banned = True @@ -717,9 +717,6 @@ def edit_comment(cid, v): return {"error":"You have to actually type something!"}, 400 if body != c.body or request.files.get("file") and request.headers.get("cf-ipcountry") != "T1": - if v.marseyawarded and not marsey_regex.fullmatch(body): - return {"error":"You can only type marseys!"}, 403 - if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')): return {"error":"You have to type more than 280 characters!"}, 403 elif v.bird and len(body) > 140: @@ -821,6 +818,9 @@ def edit_comment(cid, v): body_html = sanitize(body, edit=True) + if v.marseyawarded and marseyaward_body_regex.search(body_html): + return {"error":"You can only type marseys!"}, 403 + if len(body_html) > 20000: abort(400) c.body = body[:10000] @@ -927,7 +927,8 @@ def pin_comment(cid, v): if not comment.is_pinned: if v.id != comment.post.author_id: abort(403) - comment.is_pinned = v.username + " (OP)" + if comment.post.ghost: comment.is_pinned = "(OP)" + else: comment.is_pinned = v.username + " (OP)" g.db.add(comment) diff --git a/files/routes/front.py b/files/routes/front.py index 6ed93ca17..46f53772b 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -367,7 +367,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" elif v.subs == 3: pins = pins.filter(Submission.sub.in_(v.subbed_subs)) elif v.subs == 4: - pins = pins.filter(Submission.sub.notin_(v.all_blocks)) + pins = pins.filter(Submission.sub != None, Submission.sub.notin_(v.all_blocks)) if v and v.admin_level < 2: pins = pins.filter(Submission.author_id.notin_(v.userblocks)) diff --git a/files/routes/login.py b/files/routes/login.py index f4f41b900..0daa4f0a5 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -330,6 +330,8 @@ def sign_up_post(v): session["history"] = [] else: admin_level=0 + profileurl = '/e/' + random.choice(marseys_const) + '.webp' + new_user = User( username=username, original_username = username, @@ -337,7 +339,8 @@ def sign_up_post(v): password=request.values.get("password"), email=email, referred_by=ref_id or None, - ban_evade = int(any((x.is_banned or x.shadowbanned) and not x.unban_utc for x in g.db.query(User).filter(User.id.in_(session.get("history", []))).all() if x)) + ban_evade = int(any((x.is_banned or x.shadowbanned) and not x.unban_utc for x in g.db.query(User).filter(User.id.in_(session.get("history", []))).all() if x)), + profileurl=profileurl ) g.db.add(new_user) diff --git a/files/routes/posts.py b/files/routes/posts.py index 2573dd675..af7e4d848 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -20,12 +20,12 @@ import requests from shutil import copyfile from sys import stdout -marseys = [f':#{x}:' for x in marseys_const] +marseys = [f':#{x}:' for x in marseys_const2] if path.exists(f'snappy_{SITE_NAME}.txt'): with open(f'snappy_{SITE_NAME}.txt', "r", encoding="utf-8") as f: if SITE == 'pcmemes.net': snappyquotes = f.read().split("{[para]}") - else: snappyquotes = [f.read().split("\n{[para]}\n")] + marseys + else: snappyquotes = f.read().split("\n{[para]}\n") + marseys else: snappyquotes = marseys IMGUR_KEY = environ.get("IMGUR_KEY").strip() @@ -464,9 +464,6 @@ def edit_post(pid, v): if len(body) > 20000: return {"error":"Character limit is 20000!"}, 403 - if v.marseyawarded and (not marsey_regex.fullmatch(title) or body and not marsey_regex.fullmatch(body)): - return {"error":"You can only type marseys!"}, 403 - if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')): return {"error":"You have to type more than 280 characters!"}, 403 elif v.bird and len(body) > 140: @@ -476,6 +473,10 @@ def edit_post(pid, v): if v.agendaposter and not v.marseyawarded: title = torture_ap(title, v.username) title_html = filter_emojis_only(title, edit=True) + + if v.marseyawarded and not marseyaward_title_regex.fullmatch(title_html): + return {"error":"You can only type marseys!"}, 403 + p.title = title[:500] p.title_html = title_html @@ -527,6 +528,9 @@ def edit_post(pid, v): body_html = sanitize(body, edit=True) + if v.marseyawarded and marseyaward_body_regex.search(body_html): + return {"error":"You can only type marseys!"}, 403 + bans = filter_comment_html(body_html) if bans: ban = bans[0] @@ -844,6 +848,10 @@ def submit_post(v, sub=None): if v.agendaposter and not v.marseyawarded: title = torture_ap(title, v.username) title_html = filter_emojis_only(title, graceful=True) + + if v.marseyawarded and not marseyaward_title_regex.fullmatch(title_html): + return {"error":"You can only type marseys!"}, 403 + if len(title_html) > 1500: return error("Rendered title is too big!") if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')): @@ -940,9 +948,6 @@ def submit_post(v, sub=None): elif len(title) > 500: return error("There's a 500 character limit for titles.") - if v.marseyawarded and (not marsey_regex.fullmatch(title) or body and not marsey_regex.fullmatch(body)): - return error("You can only type marseys!") - dup = g.db.query(Submission).filter( Submission.author_id == v.id, Submission.deleted_utc == 0, @@ -1046,6 +1051,9 @@ def submit_post(v, sub=None): body_html = sanitize(body) + if v.marseyawarded and marseyaward_body_regex.search(body_html): + return {"error":"You can only type marseys!"}, 403 + if len(body_html) > 40000: return error("Submission body too long!") bans = filter_comment_html(body_html) diff --git a/files/routes/subs.py b/files/routes/subs.py index bc5dfdfb5..3813d1b96 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -82,33 +82,6 @@ def exile_post(v, pid): -@app.post("/unexile/post/") -@is_not_permabanned -def unexile_post(v, pid): - try: pid = int(pid) - except: abort(400) - - p = get_post(pid) - sub = p.sub - if not sub: abort(400) - - if not v.mods(sub): abort(403) - - u = p.author - - if u.exiled_from(sub): - exile = g.db.query(Exile).filter_by(user_id=u.id, sub=sub).one_or_none() - g.db.delete(exile) - - send_notification(u.id, f"@{v.username} has revoked your exile from /s/{sub}") - - g.db.commit() - - return {"message": "User unexiled successfully!"} - - - - @app.post("/exile/comment/") @is_not_permabanned def exile_comment(v, cid): @@ -136,22 +109,13 @@ def exile_comment(v, cid): return {"message": "User exiled successfully!"} - - -@app.post("/unexile/comment/") +@app.post("/s//unexile/") @is_not_permabanned -def unexile_comment(v, cid): - try: cid = int(cid) - except: abort(400) - - c = get_comment(cid) - sub = c.post.sub - if not sub: abort(400) +def unexile(v, sub, uid): + u = get_account(uid) if not v.mods(sub): abort(403) - u = c.author - if u.exiled_from(sub): exile = g.db.query(Exile).filter_by(user_id=u.id, sub=sub).one_or_none() g.db.delete(exile) @@ -160,7 +124,10 @@ def unexile_comment(v, cid): g.db.commit() - return {"message": "User unexiled successfully!"} + + if request.headers.get("Authorization") or request.headers.get("xhr"): return {"message": "User unexiled successfully!"} + return redirect(f'/s/{sub}/exilees') + diff --git a/files/routes/users.py b/files/routes/users.py index f8e4bbd0d..26452b268 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -220,7 +220,7 @@ def transfer_coins(v, username): else: tax = 0 log_message = f"@{v.username} has transferred {amount} coins to @{receiver.username}" - send_repeatable_notification(TAX_NOTIF_ID, log_message) + send_repeatable_notification(GIFT_NOTIF_ID, log_message) receiver.coins += amount-tax v.coins -= amount @@ -251,7 +251,7 @@ def transfer_bux(v, username): if amount < 100: return {"error": "You have to gift at least 100 marseybux."}, 400 log_message = f"@{v.username} has transferred {amount} Marseybux to @{receiver.username}" - send_repeatable_notification(TAX_NOTIF_ID, log_message) + send_repeatable_notification(GIFT_NOTIF_ID, log_message) receiver.procoins += amount v.procoins -= amount @@ -736,7 +736,9 @@ def u_username_comments(username, v=None): return render_template("userpage_blocked.html", u=u, v=v) - page = max(int(request.values.get("page", "1")), 1) + try: page = max(int(request.values.get("page", "1")), 1) + except: page = 1 + sort=request.values.get("sort","new") t=request.values.get("t","all") diff --git a/files/routes/votes.py b/files/routes/votes.py index 6f2d6ed58..863e5c3e4 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -19,7 +19,7 @@ def admin_vote_info_get(v): else: abort(400) except: abort(400) - if thing.ghost: abort(403) + if thing.ghost and v.id != AEVANN_ID: abort(403) if not thing.author: print(thing.id, flush=True) diff --git a/files/templates/comments.html b/files/templates/comments.html index fb57d4dda..b04a55ae8 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -265,11 +265,11 @@