mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/ddclient - change netcup separator as discussed closes https://github.com/opnsense/plugins/pull/3549
This commit is contained in:
@@ -66,17 +66,11 @@ class Netcup(BaseAccount):
|
||||
|
||||
self.hostname, self.domain = self.settings['hostnames'].split('.', 1)
|
||||
|
||||
if self.settings['password'].count(':') > 1:
|
||||
if self.settings['password'].count('\\:') == 1:
|
||||
self.settings['APIPassword'], self.settings['APIKey'] = self.settings['password'].split('\\:')
|
||||
elif self.settings['password'].count(':') == 1:
|
||||
self.settings['APIPassword'], self.settings['APIKey'] = self.settings['password'].split(':')
|
||||
if self.settings['password'].count('|') == 1:
|
||||
self.settings['APIPassword'], self.settings['APIKey'] = self.settings['password'].split('|')
|
||||
|
||||
if self.settings['APIPassword'] is None or self.settings['APIKey'] is None:
|
||||
syslog.syslog(
|
||||
syslog.LOG_ERR,
|
||||
"Unable to parse APIPassword:APIKey, when colons are used, make sure to escape the separator (\:)."
|
||||
)
|
||||
syslog.syslog(syslog.LOG_ERR, "Unable to parse APIPassword|APIKey.")
|
||||
return False
|
||||
|
||||
self.netcupAPISessionID = self._login()
|
||||
|
||||
Reference in New Issue
Block a user