diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 0ab99a8284..d1ed6c191a 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -1135,3 +1135,22 @@ Eventually it'll be too much to bear - you'll buy a rope, tie a noose, put it ar This is your fate. This is what you chose. There is no turning back. """ + +CHUD_PHRASES = ( + "Trans lives matter", + "Black lives matter", + "Black trans lives matter", + "The future is female", + "I say this as a feminist ally", + "I stand with israel", + "Vaccines work", + "Trans women are women", + "Furry rights are human rights", + "Trans furry lives matter", + "Trump for prison", + "Hillary 2024", + "Jewish lives matter", + "White extinction is long overdue", + "Climate action now", + "Long live the CCP" + ) diff --git a/files/routes/awards.py b/files/routes/awards.py index 8288690ddc..1c8a36bcea 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -322,8 +322,8 @@ def award_thing(v, thing_type, id): if not note: abort(400, "Missing phrase!") - if len(note) > 35: - abort(400, "Max length for phrase is 35 characters!") + if note not in CHUD_PHRASES: + abort(400, "Invalid phrase!") author.agendaposter_phrase = note.lower() diff --git a/files/routes/jinja2.py b/files/routes/jinja2.py index 11a7f0ac87..9e71ca23ab 100644 --- a/files/routes/jinja2.py +++ b/files/routes/jinja2.py @@ -138,4 +138,5 @@ def inject_constants(): "BIO_FRIENDS_ENEMIES_LENGTH_LIMIT":BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, "IMMUNE_TO_AWARDS": IMMUNE_TO_AWARDS, "SITE_FULL_IMAGES": SITE_FULL_IMAGES, "IS_FISTMAS":IS_FISTMAS, "IS_HOMOWEEN":IS_HOMOWEEN, "IS_DKD":IS_DKD, "IS_EVENT":IS_EVENT, + "CHUD_PHRASES":CHUD_PHRASES, } diff --git a/files/templates/modals/award.html b/files/templates/modals/award.html index 0d040dc673..e9ea852bca 100644 --- a/files/templates/modals/award.html +++ b/files/templates/modals/award.html @@ -39,25 +39,6 @@ - {% set CHUD_PHRASES = [ - "Trans lives matter", - "Black lives matter", - "Black trans lives matter", - "The future is female", - "I say this as a feminist ally", - "I stand with israel", - "Vaccines work", - "Trans women are women", - "Furry rights are human rights", - "Trans furry lives matter", - "Trump for prison", - "Hillary 2024", - "Jewish lives matter", - "White extinction is long overdue", - "Climate action now", - "Long live the CCP", - ] %} -