Explorar el Código

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 hace 10 meses
padre
commit
a0c0d3d37b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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;
             }