]> git.ipfire.org Git - ipfire.org.git/commitdiff
Serve all downloads over HTTPS
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Oct 2017 14:07:11 +0000 (16:07 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Oct 2017 14:07:11 +0000 (16:07 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
static/js/site.js
templates/base.html
templates/download.html
webapp/backend/releases.py

index a4ca8c449a8543fa5b146ce338bd0cf022b39c80..18349599a245f38232e9f7097c7488ee2c40ba16 100644 (file)
@@ -27,7 +27,7 @@ $("a.download-splash").click(function(event) {
        event.preventDefault();
        linkLocation = this.href;
 
-       window.location = "http://downloads.ipfire.org/download-splash?file="+linkLocation;
+       window.location = "https://downloads.ipfire.org/download-splash?file="+linkLocation;
 });
 
 var $window = $(window);
@@ -43,7 +43,7 @@ if (/.*download-splash.*/i.test(window.location.href)) {
        $("p.download-path").ready(function(){
                var valid = false;
                var allowed_prefixes = [
-                       "http://downloads.ipfire.org/",
+                       "https://downloads.ipfire.org/",
                ]
 
                var file_url = $.query("file");
index 6cd33c9f1f5370b5a3eccbb46f3b0e005b7fea8e..73775cd3d3847e2500150acf556d37d79c221a0e 100644 (file)
                                                                        <a href="http://www.ipfire.org/about">{{ _("About IPFire") }}</a>
                                                                </li>
                                                                <li>
-                                                                       <a href="http://downloads.ipfire.org">{{ _("Download") }}</a>
+                                                                       <a href="https://downloads.ipfire.org">{{ _("Download") }}</a>
                                                                </li>
                                                                <li>
-                                                                       <a href="http://planet.ipfire.org">{{ _("Planet") }}</a>
+                                                                       <a href="https://planet.ipfire.org">{{ _("Planet") }}</a>
                                                                </li>
                                                                <li>
                                                                        <a href="http://www.ipfire.org/imprint">{{ _("Imprint") }}</a>
index 98bf3b9f47b211b1e06f7da0cbd00ee41992fbb8..08c6c892359664ca6766e0d5582ba47742ba3e78 100644 (file)
@@ -11,7 +11,7 @@
                {% module DownloadButton(release) %}
 
                <p>
-                       <a href="http://downloads.ipfire.org/release/{{ release.sname }}">
+                       <a href="https://downloads.ipfire.org/release/{{ release.sname }}">
                                {{ _("Other download options") }}
                        </a>
                </p>
index 770b156cf6af2beaa3d26262713b448570e880cd..fc3efd41306833445e3f0fb6e691d2228034e39b 100644 (file)
@@ -89,9 +89,7 @@ class File(Object):
 
        @property
        def url(self):
-               baseurl = self.settings.get("download_url", "http://downloads.ipfire.org")
-
-               return urlparse.urljoin(baseurl, self.filename)
+                return urlparse.urljoin("https://downloads.ipfire.org", self.filename)
 
        @property
        def desc(self):
@@ -385,18 +383,18 @@ class Release(Object):
                assert self.supports_platform(platform)
 
                if self.sname >= "ipfire-2.19-core100":
-                       return "http://downloads.ipfire.org/%s/images/%s/vmlinuz" % (self.path, arch)
+                       return "https://downloads.ipfire.org/%s/images/%s/vmlinuz" % (self.path, arch)
 
-               return "http://downloads.ipfire.org/%s/images/vmlinuz" % self.path
+               return "https://downloads.ipfire.org/%s/images/vmlinuz" % self.path
 
        def netboot_initrd_url(self, arch, platform):
                assert self.supports_arch(arch)
                assert self.supports_platform(platform)
 
                if self.sname >= "ipfire-2.19-core100":
-                       return "http://downloads.ipfire.org/%s/images/%s/instroot" % (self.path, arch)
+                       return "https://downloads.ipfire.org/%s/images/%s/instroot" % (self.path, arch)
 
-               return "http://downloads.ipfire.org/%s/images/instroot" % self.path
+               return "https://downloads.ipfire.org/%s/images/instroot" % self.path
 
        def netboot_args(self, arch, platform):
                return ""