Reddit Secret and App ID Validation Fixed (#528)

This commit is contained in:
Chris Caron 2022-01-28 16:04:32 -05:00 committed by GitHub
parent 6a2b6130db
commit a00ce74566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -161,14 +161,14 @@ class NotifyReddit(NotifyBase):
'type': 'string',
'private': True,
'required': True,
'regex': (r'^[a-z0-9-]+$', 'i'),
'regex': (r'^[a-z0-9_-]+$', 'i'),
},
'app_secret': {
'name': _('Application Secret'),
'type': 'string',
'private': True,
'required': True,
'regex': (r'^[a-z0-9-]+$', 'i'),
'regex': (r'^[a-z0-9_-]+$', 'i'),
},
'target_subreddit': {
'name': _('Target Subreddit'),

View File

@ -54,12 +54,12 @@ apprise_url_tests = (
# No app secret
'instance': TypeError,
}),
('reddit://user:password@app_id/appsecret/apprise', {
# No invalid app_id (has underscore)
('reddit://user:password@app%id/appsecret/apprise', {
# No invalid app_id (has percent)
'instance': TypeError,
}),
('reddit://user:password@app-id/app_secret/apprise', {
# No invalid app_secret (has underscore)
('reddit://user:password@app%id/app_secret/apprise', {
# No invalid app_secret (has percent)
'instance': TypeError,
}),
('reddit://user:password@app-id/app-secret/apprise?kind=invalid', {