From fcd70ff84cbc63268c542c584eb8fdcc11bb36d7 Mon Sep 17 00:00:00 2001 From: Toni Wells <7094373+isometimescode@users.noreply.github.com> Date: Fri, 3 May 2024 05:03:22 -0700 Subject: [PATCH] Bugfix: Update apprise:// token length (#1120) --- apprise/plugins/apprise_api.py | 2 +- test/test_plugin_apprise_api.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apprise/plugins/apprise_api.py b/apprise/plugins/apprise_api.py index cb7d6bfb..fd71236b 100644 --- a/apprise/plugins/apprise_api.py +++ b/apprise/plugins/apprise_api.py @@ -123,7 +123,7 @@ class NotifyAppriseAPI(NotifyBase): 'type': 'string', 'required': True, 'private': True, - 'regex': (r'^[A-Z0-9_-]{1,32}$', 'i'), + 'regex': (r'^[A-Z0-9_-]{1,128}$', 'i'), }, }) diff --git a/test/test_plugin_apprise_api.py b/test/test_plugin_apprise_api.py index c33e5f63..c843cf5e 100644 --- a/test/test_plugin_apprise_api.py +++ b/test/test_plugin_apprise_api.py @@ -70,6 +70,12 @@ apprise_url_tests = ( # Our expected url(privacy=True) startswith() response: 'privacy_url': 'apprise://localhost/a...a/', }), + # A valid URL with long Token + ('apprise://localhost/%s' % ('a' * 128), { + 'instance': NotifyAppriseAPI, + # Our expected url(privacy=True) startswith() response: + 'privacy_url': 'apprise://localhost/a...a/', + }), # A valid URL with Token (using port) ('apprise://localhost:8080/%s' % ('b' * 32), { 'instance': NotifyAppriseAPI,