modmail: constantify user ID and fix bug where users can bypass modmail route checks

the random c.sentto == 2 magic numbers in the code is... pretty
unmaintainable and unless you were aware of who "2" was, it's hard to
know what's going on.

in addition, we force modmail to go through the modmail path instead of
letting users bypass validation checks.
This commit is contained in:
justcool393 2023-02-16 19:26:58 -06:00 committed by Ben Rog-Wilhelm
parent 81cfc09fed
commit 1574c46d0a
4 changed files with 10 additions and 6 deletions

View file

@ -75,6 +75,7 @@ def inject_constants():
"SITE_FULL":SITE_FULL,
"AUTOJANNY_ID":AUTOJANNY_ID,
"NOTIFICATIONS_ID":NOTIFICATIONS_ID,
"MODMAIL_ID":MODMAIL_ID,
"PUSHER_ID":PUSHER_ID,
"CC":CC,
"CC_TITLE":CC_TITLE,