mirror of https://github.com/caronc/apprise
verify= included in url() response
parent
5997f6d6c5
commit
b809b24aad
|
@ -435,7 +435,7 @@ class URLBase(object):
|
||||||
results['secure'] = (results['schema'][-1] == 's')
|
results['secure'] = (results['schema'][-1] == 's')
|
||||||
|
|
||||||
# Support SSL Certificate 'verify' keyword. Default to being enabled
|
# Support SSL Certificate 'verify' keyword. Default to being enabled
|
||||||
results['verify'] = verify_host
|
results['verify'] = True
|
||||||
|
|
||||||
if 'verify' in results['qsd']:
|
if 'verify' in results['qsd']:
|
||||||
results['verify'] = parse_bool(
|
results['verify'] = parse_bool(
|
||||||
|
|
|
@ -292,11 +292,12 @@ class ConfigBase(URLBase):
|
||||||
# Create log entry of loaded URL
|
# Create log entry of loaded URL
|
||||||
ConfigBase.logger.debug('Loaded URL: {}'.format(plugin.url()))
|
ConfigBase.logger.debug('Loaded URL: {}'.format(plugin.url()))
|
||||||
|
|
||||||
except Exception:
|
except Exception as e:
|
||||||
# the arguments are invalid or can not be used.
|
# the arguments are invalid or can not be used.
|
||||||
ConfigBase.logger.warning(
|
ConfigBase.logger.warning(
|
||||||
'Could not load URL {} on line {}.'.format(
|
'Could not load URL {} on line {}.'.format(
|
||||||
url, line))
|
url, line))
|
||||||
|
ConfigBase.logger.debug('Loading Exception: %s' % str(e))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# if we reach here, we successfully loaded our data
|
# if we reach here, we successfully loaded our data
|
||||||
|
|
|
@ -283,6 +283,7 @@ class NotifyBoxcar(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{access}/{secret}/{targets}/?{args}'.format(
|
return '{schema}://{access}/{secret}/{targets}/?{args}'.format(
|
||||||
|
|
|
@ -315,7 +315,8 @@ class NotifyDBus(NotifyBase):
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
'urgency': 'normal' if self.urgency not in _map
|
'urgency': 'normal' if self.urgency not in _map
|
||||||
else _map[self.urgency]
|
else _map[self.urgency],
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# x in (x,y) screen coordinates
|
# x in (x,y) screen coordinates
|
||||||
|
|
|
@ -264,6 +264,7 @@ class NotifyDiscord(NotifyBase):
|
||||||
'footer': 'yes' if self.footer else 'no',
|
'footer': 'yes' if self.footer else 'no',
|
||||||
'footer_logo': 'yes' if self.footer_logo else 'no',
|
'footer_logo': 'yes' if self.footer_logo else 'no',
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{webhook_id}/{webhook_token}/?{args}'.format(
|
return '{schema}://{webhook_id}/{webhook_token}/?{args}'.format(
|
||||||
|
|
|
@ -441,6 +441,7 @@ class NotifyEmail(NotifyBase):
|
||||||
'smtp': self.smtp_host,
|
'smtp': self.smtp_host,
|
||||||
'timeout': self.timeout,
|
'timeout': self.timeout,
|
||||||
'user': self.user,
|
'user': self.user,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# pull email suffix from username (if present)
|
# pull email suffix from username (if present)
|
||||||
|
|
|
@ -550,6 +550,7 @@ class NotifyEmby(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'modal': 'yes' if self.modal else 'no',
|
'modal': 'yes' if self.modal else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine Authentication
|
# Determine Authentication
|
||||||
|
|
|
@ -145,6 +145,7 @@ class NotifyFaast(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{authtoken}/?{args}'.format(
|
return '{schema}://{authtoken}/?{args}'.format(
|
||||||
|
|
|
@ -262,6 +262,7 @@ class NotifyFlock(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{token}/{targets}?{args}'\
|
return '{schema}://{token}/{targets}?{args}'\
|
||||||
|
|
|
@ -347,6 +347,7 @@ class NotifyGitter(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{token}/{targets}/?{args}'.format(
|
return '{schema}://{token}/{targets}/?{args}'.format(
|
||||||
|
|
|
@ -196,7 +196,8 @@ class NotifyGnome(NotifyBase):
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
'urgency': 'normal' if self.urgency not in _map
|
'urgency': 'normal' if self.urgency not in _map
|
||||||
else _map[self.urgency]
|
else _map[self.urgency],
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://_/?{args}'.format(
|
return '{schema}://_/?{args}'.format(
|
||||||
|
|
|
@ -195,6 +195,7 @@ class NotifyGotify(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'priority': self.priority,
|
'priority': self.priority,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
default_port = 443 if self.secure else 80
|
default_port = 443 if self.secure else 80
|
||||||
|
|
|
@ -238,6 +238,7 @@ class NotifyGrowl(NotifyBase):
|
||||||
_map[GrowlPriority.NORMAL] if self.priority not in _map
|
_map[GrowlPriority.NORMAL] if self.priority not in _map
|
||||||
else _map[self.priority],
|
else _map[self.priority],
|
||||||
'version': self.version,
|
'version': self.version,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
auth = ''
|
auth = ''
|
||||||
|
|
|
@ -249,6 +249,7 @@ class NotifyIFTTT(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Store any new key/value pairs added to our list
|
# Store any new key/value pairs added to our list
|
||||||
|
|
|
@ -86,6 +86,7 @@ class NotifyJSON(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Append our headers into our args
|
# Append our headers into our args
|
||||||
|
|
|
@ -236,6 +236,7 @@ class NotifyJoin(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{apikey}/{devices}/?{args}'.format(
|
return '{schema}://{apikey}/{devices}/?{args}'.format(
|
||||||
|
|
|
@ -262,6 +262,7 @@ class NotifyMSTeams(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{token_a}/{token_b}/{token_c}/'\
|
return '{schema}://{token_a}/{token_b}/{token_c}/'\
|
||||||
|
|
|
@ -874,6 +874,7 @@ class NotifyMatrix(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.mode:
|
if self.mode:
|
||||||
|
|
|
@ -223,6 +223,7 @@ class NotifyMatterMost(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.channels:
|
if self.channels:
|
||||||
|
|
|
@ -209,7 +209,8 @@ class NotifyProwl(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'priority': 'normal' if self.priority not in _map
|
'priority': 'normal' if self.priority not in _map
|
||||||
else _map[self.priority]
|
else _map[self.priority],
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{apikey}/{providerkey}/?{args}'.format(
|
return '{schema}://{apikey}/{providerkey}/?{args}'.format(
|
||||||
|
|
|
@ -180,6 +180,7 @@ class NotifyPushBullet(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
targets = '/'.join([NotifyPushBullet.quote(x) for x in self.targets])
|
targets = '/'.join([NotifyPushBullet.quote(x) for x in self.targets])
|
||||||
|
|
|
@ -248,6 +248,7 @@ class NotifyPushed(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{app_key}/{app_secret}/{targets}/?{args}'.format(
|
return '{schema}://{app_key}/{app_secret}/{targets}/?{args}'.format(
|
||||||
|
|
|
@ -107,6 +107,7 @@ class NotifyPushjet(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
default_port = 443 if self.secure else 80
|
default_port = 443 if self.secure else 80
|
||||||
|
|
|
@ -243,6 +243,7 @@ class NotifyPushover(NotifyBase):
|
||||||
'priority':
|
'priority':
|
||||||
_map[PushoverPriority.NORMAL] if self.priority not in _map
|
_map[PushoverPriority.NORMAL] if self.priority not in _map
|
||||||
else _map[self.priority],
|
else _map[self.priority],
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Escape our devices
|
# Escape our devices
|
||||||
|
|
|
@ -137,6 +137,7 @@ class NotifyRocketChat(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine Authentication
|
# Determine Authentication
|
||||||
|
|
|
@ -248,6 +248,7 @@ class NotifyRyver(NotifyBase):
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
'mode': self.mode,
|
'mode': self.mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine if there is a botname present
|
# Determine if there is a botname present
|
||||||
|
|
|
@ -524,6 +524,7 @@ class NotifySNS(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://{key_id}/{key_secret}/{region}/{targets}/'\
|
return '{schema}://{key_id}/{key_secret}/{region}/{targets}/'\
|
||||||
|
|
|
@ -329,6 +329,7 @@ class NotifySlack(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine if there is a botname present
|
# Determine if there is a botname present
|
||||||
|
|
|
@ -501,6 +501,7 @@ class NotifyTelegram(NotifyBase):
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': self.include_image,
|
'image': self.include_image,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# No need to check the user token because the user automatically gets
|
# No need to check the user token because the user automatically gets
|
||||||
|
|
|
@ -163,6 +163,7 @@ class NotifyTwitter(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(self.targets) > 0:
|
if len(self.targets) > 0:
|
||||||
|
|
|
@ -206,6 +206,7 @@ class NotifyWindows(NotifyBase):
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
'duration': str(self.duration),
|
'duration': str(self.duration),
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
return '{schema}://_/?{args}'.format(
|
return '{schema}://_/?{args}'.format(
|
||||||
|
|
|
@ -258,6 +258,7 @@ class NotifyXBMC(NotifyBase):
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
'image': 'yes' if self.include_image else 'no',
|
'image': 'yes' if self.include_image else 'no',
|
||||||
'duration': str(self.duration),
|
'duration': str(self.duration),
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine Authentication
|
# Determine Authentication
|
||||||
|
|
|
@ -101,6 +101,7 @@ class NotifyXML(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
# Append our headers into our args
|
# Append our headers into our args
|
||||||
|
|
|
@ -287,6 +287,7 @@ class NotifyXMPP(NotifyBase):
|
||||||
args = {
|
args = {
|
||||||
'format': self.notify_format,
|
'format': self.notify_format,
|
||||||
'overflow': self.overflow_mode,
|
'overflow': self.overflow_mode,
|
||||||
|
'verify': 'yes' if self.verify_certificate else 'no',
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.jid:
|
if self.jid:
|
||||||
|
|
Loading…
Reference in New Issue