]> git.ipfire.org Git - ipfire.org.git/commitdiff
Move planet to HTTPS
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Oct 2017 10:28:42 +0000 (12:28 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Oct 2017 10:28:42 +0000 (12:28 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
webapp/backend/accounts.py
webapp/backend/planet.py
webapp/handlers_accounts.py

index eb30e2b371adcb45927f07e8f42ecadebeef84c4..c7b943a17e394269a9bfdad067a8c179a07e8eb1 100644 (file)
@@ -307,7 +307,7 @@ class Account(Object):
                else:
                        hostname = "accounts.ipfire.org"
 
-               url = "http://%s/avatar/%s.jpg" % (hostname, self.uid)
+               url = "https://%s/avatar/%s.jpg" % (hostname, self.uid)
 
                if size:
                        url += "?size=%s" % size
@@ -351,7 +351,7 @@ class Account(Object):
                        gravatar_email = "nobody@ipfire.org"
 
                # construct the url
-               gravatar_url = "http://www.gravatar.com/avatar/" + \
+               gravatar_url = "https://www.gravatar.com/avatar/" + \
                        hashlib.md5(gravatar_email).hexdigest() + "?"
                gravatar_url += urllib.urlencode({'d': "mm", 's': str(size)})
 
index 7f69b51c526396ecd00eb80781692149f0ea87e2..c6b3582554d954ea72ab99f86bc5594eafcb507a 100644 (file)
@@ -35,7 +35,7 @@ class PlanetEntry(Object):
 
        @property
        def url(self):
-               return "http://planet.ipfire.org/post/%s" % self.slug
+               return "https://planet.ipfire.org/post/%s" % self.slug
 
        def set_published(self, published):
                if self.published == published:
index bc419fdd2774228aa97d15f949844b9504510f84..d07b936cab23ab3d0116ff6eeeae482ed3993620 100644 (file)
@@ -36,7 +36,7 @@ class AccountsAvatarHandler(BaseHandler):
                        else:
                                avatar = account.get_gravatar_url(size)
 
-               if avatar.startswith("http://"):
+                if avatar.startswith("http://") or avatar.startswith("https://"):
                        return self.redirect(avatar)
 
                self.set_header("Cache-Control", "public,max-age=300")