public inbox for ddns@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Lightning Wire Labs: Drop authentication using username/password
@ 2020-01-30 17:38 Michael Tremer
  2020-01-30 17:38 ` [PATCH 2/2] Lightning Wire Labs: Access website using HTTPS Michael Tremer
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Tremer @ 2020-01-30 17:38 UTC (permalink / raw)
  To: ddns

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

This is quite dangerous using the main credentials to
update DDNS. Hence LWL is dropping this now and only
supports authentication using tokens.

Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
 src/ddns/providers.py | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 661fbcc..95f3dd5 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -1227,27 +1227,17 @@ class DDNSProviderLightningWireLabs(DDNSProvider):
 	url = "https://dns.lightningwirelabs.com/update"
 
 	def update(self):
+		# Raise an error if no auth details are given.
+		if not self.token:
+			raise DDNSConfigurationError
+
 		data =  {
 			"hostname" : self.hostname,
+			"token"    : self.token,
 			"address6" : self.get_address("ipv6", "-"),
 			"address4" : self.get_address("ipv4", "-"),
 		}
 
-		# Check if a token has been set.
-		if self.token:
-			data["token"] = self.token
-
-		# Check for username and password.
-		elif self.username and self.password:
-			data.update({
-				"username" : self.username,
-				"password" : self.password,
-			})
-
-		# Raise an error if no auth details are given.
-		else:
-			raise DDNSConfigurationError
-
 		# Send update to the server.
 		response = self.send_request(self.url, data=data)
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] Lightning Wire Labs: Access website using HTTPS
  2020-01-30 17:38 [PATCH 1/2] Lightning Wire Labs: Drop authentication using username/password Michael Tremer
@ 2020-01-30 17:38 ` Michael Tremer
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Tremer @ 2020-01-30 17:38 UTC (permalink / raw)
  To: ddns

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
---
 src/ddns/providers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 95f3dd5..4154c91 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -1219,7 +1219,7 @@ class DDNSProviderGoogle(DDNSProtocolDynDNS2, DDNSProvider):
 class DDNSProviderLightningWireLabs(DDNSProvider):
 	handle    = "dns.lightningwirelabs.com"
 	name      = "Lightning Wire Labs DNS Service"
-	website   = "http://dns.lightningwirelabs.com/"
+	website   = "https://dns.lightningwirelabs.com/"
 
 	# Information about the format of the HTTPS request is to be found
 	# https://dns.lightningwirelabs.com/knowledge-base/api/ddns
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-30 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 17:38 [PATCH 1/2] Lightning Wire Labs: Drop authentication using username/password Michael Tremer
2020-01-30 17:38 ` [PATCH 2/2] Lightning Wire Labs: Access website using HTTPS Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox