Skip to content

Commit

Permalink
dns/ddclient - change netcup separator as discussed closes #3549
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Feb 11, 2024
1 parent 85d432a commit cab2921
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions dns/ddclient/src/opnsense/scripts/ddclient/lib/account/netcup.py
Expand Up @@ -66,17 +66,11 @@ def execute(self):

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()
Expand Down

0 comments on commit cab2921

Please sign in to comment.