From patchwork Wed Dec 2 09:13:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3690 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 4CmCvj2l3Pz3wpp for ; Wed, 2 Dec 2020 09:14:09 +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 4CmCvg0GJJz1v8; Wed, 2 Dec 2020 09:14:06 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4CmCvf26SLz2y1V; Wed, 2 Dec 2020 09:14:06 +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 4CmCvc0xFBz2y1P for ; Wed, 2 Dec 2020 09:14:04 +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 4CmCvZ0cVWzsb; Wed, 2 Dec 2020 09:14:01 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1606900442; 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=OEHF3C9HsMAKTCL+H3bA0Phm65fl+3lI3TdC4rXhqmw=; b=0lrBiWQLXq/8f4way+Eq9u+qGY//EwaJPVEKRetAc5VLzH3YjMrGRw067/lgkaIGZtxHYy j+1Q1yyw+ed4CyCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1606900442; 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=OEHF3C9HsMAKTCL+H3bA0Phm65fl+3lI3TdC4rXhqmw=; b=Az8FjuKERxyHbaLu2FzK3uY1aJCNfKNLqD/KXiylylWZjPiHkzcAS4Pz/naDVeJMj5fltk YjI+I26fqdZJUd4PFbBJC+8sg+zxiHDdA873F369PHOfD+v8kjD5ahVn3YfY42qAGjcVvq MGo/w0ELd/OxnKIgi/1WX3x/r2JsZbtXYiLqzQWbI5XQD7iKslByiIXJOOQ9gHE5HNZ7WQ dLHIxZMuqxgf9rZl517euKtuffbctpMDZhJRw2AhGltbXSCMYT0jc7fr3PpYe4gLIcIBeM uImaFzioDd/Lt2cZ8sNT8JPPRRayFB2bHC2thbdcoa/q6gcDKaPzaFRrUbubmA== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] ddns: Import upstream patch for provider DDNSS. Date: Wed, 2 Dec 2020 10:13:52 +0100 Message-Id: <20201202091352.2623-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" Fixes #12328. Signed-off-by: Stefan Schantl --- lfs/ddns | 1 + ...nss-fix-unhandled-exeption-on-update-patch | 30 +++++++++++++++++++ ...nss-fix-unhandled-exeption-on-update-patch | 30 +++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 src/patches/ddns-011-ddnss-fix-unhandled-exeption-on-update-patch create mode 100644 src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch diff --git a/lfs/ddns b/lfs/ddns index 0e045ddc4..0a71b52ea 100644 --- a/lfs/ddns +++ b/lfs/ddns @@ -73,6 +73,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # Apply upstream patches. cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-dyfi-use-https.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh cd $(DIR_APP) && ./configure \ diff --git a/src/patches/ddns-011-ddnss-fix-unhandled-exeption-on-update-patch b/src/patches/ddns-011-ddnss-fix-unhandled-exeption-on-update-patch new file mode 100644 index 000000000..95f6391be --- /dev/null +++ b/src/patches/ddns-011-ddnss-fix-unhandled-exeption-on-update-patch @@ -0,0 +1,30 @@ +commit 7d0956d14ff8d823551ccd47ccf1492c9da9aac9 +Author: Stefan Schantl +Date: Mon May 25 18:00:51 2020 +0200 + + ProviderDDNSS: Fix unhandled exception on update + + In python > 3.3 the getheader() attribute is not longer part of the + urllib.response response.info() object. It is part of response object + and so directly can be accessed. + + Fixes #12328 + + Signed-off-by: Stefan Schantl + +diff --git a/src/ddns/providers.py b/src/ddns/providers.py +index f1fed22..46d8a67 100644 +--- a/src/ddns/providers.py ++++ b/src/ddns/providers.py +@@ -642,10 +642,8 @@ class DDNSProviderDDNSS(DDNSProvider): + response = self.send_request(self.url, data=data) + + # This provider sends the response code as part of the header. +- header = response.info() +- + # Get status information from the header. +- output = header.getheader('ddnss-response') ++ output = response.getheader('ddnss-response') + + # Handle success messages. + if output == "good" or output == "nochg": diff --git a/src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch b/src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch new file mode 100644 index 000000000..95f6391be --- /dev/null +++ b/src/patches/ddns-013-ddnss-fix-unhandled-exeption-on-update-patch @@ -0,0 +1,30 @@ +commit 7d0956d14ff8d823551ccd47ccf1492c9da9aac9 +Author: Stefan Schantl +Date: Mon May 25 18:00:51 2020 +0200 + + ProviderDDNSS: Fix unhandled exception on update + + In python > 3.3 the getheader() attribute is not longer part of the + urllib.response response.info() object. It is part of response object + and so directly can be accessed. + + Fixes #12328 + + Signed-off-by: Stefan Schantl + +diff --git a/src/ddns/providers.py b/src/ddns/providers.py +index f1fed22..46d8a67 100644 +--- a/src/ddns/providers.py ++++ b/src/ddns/providers.py +@@ -642,10 +642,8 @@ class DDNSProviderDDNSS(DDNSProvider): + response = self.send_request(self.url, data=data) + + # This provider sends the response code as part of the header. +- header = response.info() +- + # Get status information from the header. +- output = header.getheader('ddnss-response') ++ output = response.getheader('ddnss-response') + + # Handle success messages. + if output == "good" or output == "nochg":