]> git.ipfire.org Git - ddns.git/blobdiff - src/ddns/providers.py
dy.fi: Use HTTPS to perform updates.
[ddns.git] / src / ddns / providers.py
index 1263a80a3e4a70ea2ff55fff0666f1f1d992dd94..f1fed2265c6c62510f3207039cf26f007fa3deca 100644 (file)
@@ -826,7 +826,7 @@ class DDNSProviderDyFi(DDNSProtocolDynDNS2, DDNSProvider):
        # https://www.dy.fi/page/clients?lang=en
        # https://www.dy.fi/page/specification?lang=en
 
-       url = "http://www.dy.fi/nic/update"
+       url = "https://www.dy.fi/nic/update"
 
        # Please only send automatic updates when your IP address changes,
        # or once per 5 to 6 days to refresh the address mapping (they will
@@ -1248,7 +1248,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
@@ -1256,27 +1256,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)