This is really hard to maintain when adding new or altering existing providers.
Reference #12415.
Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org --- html/cgi-bin/ddns.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index 715c37290..024eaf7f6 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -665,13 +665,13 @@ sub GenerateDDNSConfigFile {
my $use_token = 0;
- # Handle token based auth for various providers. - if ($provider ~~ ["dns.lightningwirelabs.com", "entrydns.net", "regfish.com", - "spdns.de", "zzzz.io"] && $username eq "token") { + # Check if token based auth is configured. + if ($username eq "token") { $use_token = 1; + }
# Handle token auth for freedns.afraid.org and regfish.com. - } elsif ($provider ~~ ["freedns.afraid.org", "regfish.com"] && $password eq "") { + if ($provider ~~ ["freedns.afraid.org", "regfish.com"] && $password eq "") { $use_token = 1; $password = $username;