mirror of
https://github.com/caronc/apprise.git
synced 2025-02-14 09:19:23 +01:00
Reddit Secret and App ID Validation Fixed (#528)
This commit is contained in:
parent
6a2b6130db
commit
a00ce74566
@ -161,14 +161,14 @@ class NotifyReddit(NotifyBase):
|
|||||||
'type': 'string',
|
'type': 'string',
|
||||||
'private': True,
|
'private': True,
|
||||||
'required': True,
|
'required': True,
|
||||||
'regex': (r'^[a-z0-9-]+$', 'i'),
|
'regex': (r'^[a-z0-9_-]+$', 'i'),
|
||||||
},
|
},
|
||||||
'app_secret': {
|
'app_secret': {
|
||||||
'name': _('Application Secret'),
|
'name': _('Application Secret'),
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'private': True,
|
'private': True,
|
||||||
'required': True,
|
'required': True,
|
||||||
'regex': (r'^[a-z0-9-]+$', 'i'),
|
'regex': (r'^[a-z0-9_-]+$', 'i'),
|
||||||
},
|
},
|
||||||
'target_subreddit': {
|
'target_subreddit': {
|
||||||
'name': _('Target Subreddit'),
|
'name': _('Target Subreddit'),
|
||||||
|
@ -54,12 +54,12 @@ apprise_url_tests = (
|
|||||||
# No app secret
|
# No app secret
|
||||||
'instance': TypeError,
|
'instance': TypeError,
|
||||||
}),
|
}),
|
||||||
('reddit://user:password@app_id/appsecret/apprise', {
|
('reddit://user:password@app%id/appsecret/apprise', {
|
||||||
# No invalid app_id (has underscore)
|
# No invalid app_id (has percent)
|
||||||
'instance': TypeError,
|
'instance': TypeError,
|
||||||
}),
|
}),
|
||||||
('reddit://user:password@app-id/app_secret/apprise', {
|
('reddit://user:password@app%id/app_secret/apprise', {
|
||||||
# No invalid app_secret (has underscore)
|
# No invalid app_secret (has percent)
|
||||||
'instance': TypeError,
|
'instance': TypeError,
|
||||||
}),
|
}),
|
||||||
('reddit://user:password@app-id/app-secret/apprise?kind=invalid', {
|
('reddit://user:password@app-id/app-secret/apprise?kind=invalid', {
|
||||||
|
Loading…
Reference in New Issue
Block a user