Procházet zdrojové kódy

Make sure legacy check returns true only on HTTPS (not like ftp or whatever)

I am not sure why it was expressed so convoluted before?

Found that in https://github.com/orgs/PrivateBin/discussions/1657
rugk před 10 měsíci
rodič
revize
a0c0d3d37b
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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;
             }