verify= included in url() response

pull/100/head
Chris Caron 2019-04-06 00:43:02 -04:00
parent 5997f6d6c5
commit b809b24aad
34 changed files with 38 additions and 5 deletions

View File

@ -435,7 +435,7 @@ class URLBase(object):
results['secure'] = (results['schema'][-1] == 's')
# Support SSL Certificate 'verify' keyword. Default to being enabled
results['verify'] = verify_host
results['verify'] = True
if 'verify' in results['qsd']:
results['verify'] = parse_bool(

View File

@ -292,11 +292,12 @@ class ConfigBase(URLBase):
# Create log entry of loaded URL
ConfigBase.logger.debug('Loaded URL: {}'.format(plugin.url()))
except Exception:
except Exception as e:
# the arguments are invalid or can not be used.
ConfigBase.logger.warning(
'Could not load URL {} on line {}.'.format(
url, line))
ConfigBase.logger.debug('Loading Exception: %s' % str(e))
continue
# if we reach here, we successfully loaded our data

View File

@ -283,6 +283,7 @@ class NotifyBoxcar(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{access}/{secret}/{targets}/?{args}'.format(

View File

@ -315,7 +315,8 @@ class NotifyDBus(NotifyBase):
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'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

View File

@ -264,6 +264,7 @@ class NotifyDiscord(NotifyBase):
'footer': 'yes' if self.footer else 'no',
'footer_logo': 'yes' if self.footer_logo 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(

View File

@ -441,6 +441,7 @@ class NotifyEmail(NotifyBase):
'smtp': self.smtp_host,
'timeout': self.timeout,
'user': self.user,
'verify': 'yes' if self.verify_certificate else 'no',
}
# pull email suffix from username (if present)

View File

@ -550,6 +550,7 @@ class NotifyEmby(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'modal': 'yes' if self.modal else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
# Determine Authentication

View File

@ -145,6 +145,7 @@ class NotifyFaast(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{authtoken}/?{args}'.format(

View File

@ -262,6 +262,7 @@ class NotifyFlock(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{token}/{targets}?{args}'\

View File

@ -347,6 +347,7 @@ class NotifyGitter(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{token}/{targets}/?{args}'.format(

View File

@ -196,7 +196,8 @@ class NotifyGnome(NotifyBase):
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'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(

View File

@ -195,6 +195,7 @@ class NotifyGotify(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'priority': self.priority,
'verify': 'yes' if self.verify_certificate else 'no',
}
default_port = 443 if self.secure else 80

View File

@ -238,6 +238,7 @@ class NotifyGrowl(NotifyBase):
_map[GrowlPriority.NORMAL] if self.priority not in _map
else _map[self.priority],
'version': self.version,
'verify': 'yes' if self.verify_certificate else 'no',
}
auth = ''

View File

@ -249,6 +249,7 @@ class NotifyIFTTT(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
# Store any new key/value pairs added to our list

View File

@ -86,6 +86,7 @@ class NotifyJSON(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
# Append our headers into our args

View File

@ -236,6 +236,7 @@ class NotifyJoin(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{apikey}/{devices}/?{args}'.format(

View File

@ -262,6 +262,7 @@ class NotifyMSTeams(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{token_a}/{token_b}/{token_c}/'\

View File

@ -874,6 +874,7 @@ class NotifyMatrix(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
if self.mode:

View File

@ -223,6 +223,7 @@ class NotifyMatterMost(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
if self.channels:

View File

@ -209,7 +209,8 @@ class NotifyProwl(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'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(

View File

@ -180,6 +180,7 @@ class NotifyPushBullet(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
targets = '/'.join([NotifyPushBullet.quote(x) for x in self.targets])

View File

@ -248,6 +248,7 @@ class NotifyPushed(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{app_key}/{app_secret}/{targets}/?{args}'.format(

View File

@ -107,6 +107,7 @@ class NotifyPushjet(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
default_port = 443 if self.secure else 80

View File

@ -243,6 +243,7 @@ class NotifyPushover(NotifyBase):
'priority':
_map[PushoverPriority.NORMAL] if self.priority not in _map
else _map[self.priority],
'verify': 'yes' if self.verify_certificate else 'no',
}
# Escape our devices

View File

@ -137,6 +137,7 @@ class NotifyRocketChat(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
# Determine Authentication

View File

@ -248,6 +248,7 @@ class NotifyRyver(NotifyBase):
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'mode': self.mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
# Determine if there is a botname present

View File

@ -524,6 +524,7 @@ class NotifySNS(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://{key_id}/{key_secret}/{region}/{targets}/'\

View File

@ -329,6 +329,7 @@ class NotifySlack(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'verify': 'yes' if self.verify_certificate else 'no',
}
# Determine if there is a botname present

View File

@ -501,6 +501,7 @@ class NotifyTelegram(NotifyBase):
'format': self.notify_format,
'overflow': self.overflow_mode,
'image': self.include_image,
'verify': 'yes' if self.verify_certificate else 'no',
}
# No need to check the user token because the user automatically gets

View File

@ -163,6 +163,7 @@ class NotifyTwitter(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
if len(self.targets) > 0:

View File

@ -206,6 +206,7 @@ class NotifyWindows(NotifyBase):
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'duration': str(self.duration),
'verify': 'yes' if self.verify_certificate else 'no',
}
return '{schema}://_/?{args}'.format(

View File

@ -258,6 +258,7 @@ class NotifyXBMC(NotifyBase):
'overflow': self.overflow_mode,
'image': 'yes' if self.include_image else 'no',
'duration': str(self.duration),
'verify': 'yes' if self.verify_certificate else 'no',
}
# Determine Authentication

View File

@ -101,6 +101,7 @@ class NotifyXML(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
# Append our headers into our args

View File

@ -287,6 +287,7 @@ class NotifyXMPP(NotifyBase):
args = {
'format': self.notify_format,
'overflow': self.overflow_mode,
'verify': 'yes' if self.verify_certificate else 'no',
}
if self.jid: