From b6e06242651f68b6a040cb67a8204621d2f48839 Mon Sep 17 00:00:00 2001 From: petrCher <88943157+petrCher@users.noreply.github.com> Date: Fri, 28 Aug 2026 17:50:18 +0300 Subject: [PATCH] fixed regex with russian extra letter --- rating_api/routes/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rating_api/routes/comment.py b/rating_api/routes/comment.py index 95ee7712..02cf9bd5 100644 --- a/rating_api/routes/comment.py +++ b/rating_api/routes/comment.py @@ -98,7 +98,7 @@ async def create_comment( if len(comment_info.text) > settings.MAX_COMMENT_LENGTH: raise CommentTooLong(settings.MAX_COMMENT_LENGTH) - if re.search(r"^[a-zA-Zа-яА-Я\d!?,_\-.\"\'\[\]{}`~<>^@#№$%;:&*()+=\\\/ \n]*$", comment_info.text) is None: + if re.search(r"^[a-zA-Zа-яА-ЯёЕ\d!?,_\-.\"\'\[\]{}`~<>^@#№$%;:&*()+=\\\/ \n]*$", comment_info.text) is None: raise ForbiddenSymbol() # Сначала добавляем с user_id, который мы получили при авторизации,