diff --git a/CHANGES/1630.bugfix.rst b/CHANGES/1630.bugfix.rst new file mode 100644 index 00000000..e083dc1f --- /dev/null +++ b/CHANGES/1630.bugfix.rst @@ -0,0 +1 @@ +Fix the regex pattern that finds the "bad characters" for deeplink payload. \ No newline at end of file diff --git a/CHANGES/1631.misc.rst b/CHANGES/1631.misc.rst new file mode 100644 index 00000000..76e2fa47 --- /dev/null +++ b/CHANGES/1631.misc.rst @@ -0,0 +1 @@ + Increased max :code:`redis` version support from “<5.1.0” to “<5.3.0” diff --git a/aiogram/utils/deep_linking.py b/aiogram/utils/deep_linking.py index 19cc64c6..fe2764f7 100644 --- a/aiogram/utils/deep_linking.py +++ b/aiogram/utils/deep_linking.py @@ -18,7 +18,7 @@ from aiogram.utils.payload import decode_payload, encode_payload if TYPE_CHECKING: from aiogram import Bot -BAD_PATTERN = re.compile(r"[^A-z0-9-]") +BAD_PATTERN = re.compile(r"[^a-zA-Z0-9-_]") async def create_start_link( diff --git a/docs/locale/uk_UA/LC_MESSAGES/index.po b/docs/locale/uk_UA/LC_MESSAGES/index.po index 496a6c50..fbfb3e14 100644 --- a/docs/locale/uk_UA/LC_MESSAGES/index.po +++ b/docs/locale/uk_UA/LC_MESSAGES/index.po @@ -173,7 +173,7 @@ msgstr "" #: ../../../README.rst:71 msgid "If you have any questions, you can visit our community chats on Telegram:" -msgstr "Якщо є якість додаткові запитання, ласкаво просимо до онлайн-спільнот:" +msgstr "Якщо є додаткові запитання, ласкаво просимо до онлайн-спільнот:" #: ../../../README.rst:73 msgid "🇺🇸 `@aiogram `_" diff --git a/pyproject.toml b/pyproject.toml index 1e2f2572..a5b7cd8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ fast = [ "aiodns>=3.0.0", ] redis = [ - "redis[hiredis]>=5.0.1,<5.1.0", + "redis[hiredis]>=5.0.1,<5.3.0", ] mongo = [ "motor>=3.3.2,<3.7.0", diff --git a/tests/test_utils/test_deep_linking.py b/tests/test_utils/test_deep_linking.py index 85a6027b..c5f5259a 100644 --- a/tests/test_utils/test_deep_linking.py +++ b/tests/test_utils/test_deep_linking.py @@ -10,12 +10,14 @@ PAYLOADS = [ "aaBBccDDeeFF5544332211", -12345678901234567890, 12345678901234567890, + "underscore_and-dash", ] WRONG_PAYLOADS = [ "@BotFather", "Some:special$characters#=", "spaces spaces spaces", 1234567890123456789.0, + "has`backtick", ]