From 1fe22a4d0aa6f7e374394afc7777361e48f21823 Mon Sep 17 00:00:00 2001 From: rr- Date: Sun, 8 Jul 2018 10:09:14 +0200 Subject: [PATCH] server/tag-categories: disallow uppercase colors --- server/szurubooru/func/tag_categories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/szurubooru/func/tag_categories.py b/server/szurubooru/func/tag_categories.py index f1951a8c..bec2f0de 100644 --- a/server/szurubooru/func/tag_categories.py +++ b/server/szurubooru/func/tag_categories.py @@ -105,7 +105,7 @@ def update_category_color(category: model.TagCategory, color: str) -> None: assert category if not color: raise InvalidTagCategoryColorError('Color cannot be empty.') - if not re.match(r'^#?[0-9A-Za-z]+$', color): + if not re.match(r'^#?[0-9a-z]+$', color): raise InvalidTagCategoryColorError('Invalid color.') if util.value_exceeds_column_size(color, model.TagCategory.color): raise InvalidTagCategoryColorError('Color is too long.')