Parcourir la source

Merge pull request #1660 from PrivateBin/httpssecure

Make sure legacy check returns true only on HTTPS (not like ftp or whatever)
El RIDO il y a 10 mois
Parent
commit
9910b6f2a3
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      js/legacy.js

+ 2 - 2
js/legacy.js

@@ -106,8 +106,8 @@
                 return window.isSecureContext;
             }
 
-            // HTTP is obviously insecure
-            if (window.location.protocol !== 'http:') {
+            // HTTPS is considered secure
+            if (window.location.protocol === 'https:') {
                 return true;
             }