diff --git a/apprise/plugins/NotifySlack.py b/apprise/plugins/NotifySlack.py index b17ecd85..d4e4f611 100644 --- a/apprise/plugins/NotifySlack.py +++ b/apprise/plugins/NotifySlack.py @@ -176,7 +176,7 @@ class NotifySlack(NotifyBase): 'type': 'string', 'private': True, 'required': True, - 'regex': (r'^[A-Z0-9]{9}$', 'i'), + 'regex': (r'^[A-Z0-9]+$', 'i'), }, # Token required as part of the Webhook request # /........./BBBBBBBBB/........................ @@ -185,7 +185,7 @@ class NotifySlack(NotifyBase): 'type': 'string', 'private': True, 'required': True, - 'regex': (r'^[A-Z0-9]{9}$', 'i'), + 'regex': (r'^[A-Z0-9]+$', 'i'), }, # Token required as part of the Webhook request # /........./........./CCCCCCCCCCCCCCCCCCCCCCCC @@ -194,7 +194,7 @@ class NotifySlack(NotifyBase): 'type': 'string', 'private': True, 'required': True, - 'regex': (r'^[A-Za-z0-9]{24}$', 'i'), + 'regex': (r'^[A-Za-z0-9]+$', 'i'), }, 'target_encoded_id': { 'name': _('Target Encoded ID'), diff --git a/test/test_rest_plugins.py b/test/test_rest_plugins.py index cabaac26..99f0aa5e 100644 --- a/test/test_rest_plugins.py +++ b/test/test_rest_plugins.py @@ -3213,15 +3213,15 @@ TEST_URLS = ( 'message': '', }, }), - ('slack://username@INVALID/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7FQ/#cool', { + ('slack://username@-INVALID-/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7FQ/#cool', { # invalid 1st Token 'instance': TypeError, }), - ('slack://username@T1JJ3T3L2/INVALID/TIiajkdnlazkcOXrIdevi7FQ/#great', { + ('slack://username@T1JJ3T3L2/-INVALID-/TIiajkdnlazkcOXrIdevi7FQ/#great', { # invalid 2rd Token 'instance': TypeError, }), - ('slack://username@T1JJ3T3L2/A1BRTD4JD/INVALID/#channel', { + ('slack://username@T1JJ3T3L2/A1BRTD4JD/-INVALID-/#channel', { # invalid 3rd Token 'instance': TypeError, }),