Use TLS for SpaceAPI updates
authorRalf Jung <post@ralfj.de>
Thu, 31 Oct 2013 08:40:25 +0000 (09:40 +0100)
committerRalf Jung <post@ralfj.de>
Thu, 31 Oct 2013 08:40:25 +0000 (09:40 +0100)
spaceapi.py

index 89e3678290e652773306d697aa642a364b2c1e55..dd722b972ffb52bc8ee9af0d1184f87fc387b54c 100644 (file)
@@ -20,7 +20,7 @@ class SpaceApi:
                state_val = 1 if state else 0
                try:
                        logger.info("Setting SpaceAPI to %d" % state_val)
-                       url = "http://spaceapi.hacksaar.de/status.php?action=update&key=%s&status=%d" % (spaceApiKey, state_val)
+                       url = "https://spaceapi.hacksaar.de/status.php?action=update&key=%s&status=%d" % (spaceApiKey, state_val)
                        response = urllib.request.urlopen(url, timeout=5.0)
                        responseText = response.read().decode('utf-8').strip()
                        if response.getcode() == 200 and responseText == "UpdateSuccessful": return True