From patchwork Wed Dec 2 11:30:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3691 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4CmGwv1Pbfz3wpp for ; Wed, 2 Dec 2020 11:30:23 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4CmGwt1Lrqz1fd; Wed, 2 Dec 2020 11:30:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4CmGwt0KfYz2y1Y; Wed, 2 Dec 2020 11:30:22 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4CmGwr43Wxz2xkX for ; Wed, 2 Dec 2020 11:30:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4CmGwq2gpGz5s; Wed, 2 Dec 2020 11:30:19 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1606908619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=8fkQt0b+hw8gYlrPlzZeTofZ427wrOU6garlXc0PSy4=; b=JICV0Mz5y8nZom2ZyHh1U5+uM8wqxEDkulq4cgp+3cIrI6RBhfKU/Rb0jzGlxMVKOCSsW7 Qa5RyucSC/gQVYBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1606908619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=8fkQt0b+hw8gYlrPlzZeTofZ427wrOU6garlXc0PSy4=; b=Su8VQMKd6NDNHq0OiSFcqTOsXr1vk4G1c3lk9A7nK2Gcv/gnPQRGTwZuYQs7IagXgZQ9fd 2Gdw9KXulr6J14IQMkr4hEejenCzcgfyTfH41YApXmRDb7XAc6E/S4lgEjHdpxYpP29gMa UGdfR5J0NXxUfSmn7u6gkM/pW72Y5B8oC5h7ljv0CLl2u6YZo+V6urqN2pVcGg0EPHA4jU cM+2XZ6hKJp0JJ2PenAjmFzbI9dwI6FhsdLwMc0/xLx7lBMC544A6jCNOUGcglPOCWcTIh aQ4xVR8xi8nKm3UsBUHayvWUPPaIfYYXOcaa1giWigNTaKBtZNvvcVu5fcKbHg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ddns.cgi: Drop static provider list for token based auth. Date: Wed, 2 Dec 2020 12:30:11 +0100 Message-Id: <20201202113011.5382-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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 { 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;