From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ddns.cgi: Drop static provider list for token based auth. Date: Wed, 02 Dec 2020 12:30:11 +0100 Message-ID: <20201202113011.5382-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4888343764197768078==" List-Id: --===============4888343764197768078== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is really hard to maintain when adding new or altering existing providers. Reference #12415. Signed-off-by: Stefan Schantl --- 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 { =20 my $use_token =3D 0; =20 - # Handle token based auth for various providers. - if ($provider ~~ ["dns.lightningwirelabs.com", "entrydns.net", "regfish.co= m", - "spdns.de", "zzzz.io"] && $username eq "token") { + # Check if token based auth is configured. + if ($username eq "token") { $use_token =3D 1; + } =20 # Handle token auth for freedns.afraid.org and regfish.com. - } elsif ($provider ~~ ["freedns.afraid.org", "regfish.com"] && $password e= q "") { + if ($provider ~~ ["freedns.afraid.org", "regfish.com"] && $password eq "")= { $use_token =3D 1; $password =3D $username; =20 --=20 2.20.1 --===============4888343764197768078==--