The downside to this method is that since the resulting cryptographic hash and salt have to be in the resulting file, so there is nothing stopping someone from pulling the hash/salt out and bruteforcing it locally (as opposed to being able to ratelimit login attempts on a server) if they are so inclined and have the required resources.. which may not be that much in the way of resources as the tool uses 1000 iteratio…
Right but all that's happening here is stretching. So the difference only matters in the middle. Regardless of the strategy bad guys will guess "1234" or "sesame" (too easy) and they won't guess a random 128-bit key I just generated with my hexadecimal dice (impossible). This weakness only means it's easier than expected to guess your password is "suckitelon" or "GoCowboys1978" or whatever We put a lot of effort into…
Password protect a static HTML page
161–170 of 294 posts
Re: Password protect a static HTML page
#162Use apache to serve your page and htpasswd to provide basic authentication. Easy 1994 answer
Re: Password protect a static HTML page
#163The use case for a document like this is a little different from .htaccess. This is something you can share, email, host, etc and have some security in transit and at rest. Yes, .htaccess password protects on the web server, but that is one specific use case and requires a lot of machinery and specific environment. JavaScript is everywhere. And this is a static HTML document in the sense that there is no server side…
Re: Password protect a static HTML page
#164I saw a super simple example of this back in the 90s when I was first leaning web development (was in Web Development for Dummies or some such). The page prompted the user for the password, and then used the password to generate the URL for the hidden page and redirected the user there. Of course this wasn’t over HTTPS, and you got a 404 if you entered the wrong password, but it was still a neat hobbyist trick for th…
Re: Password protect a static HTML page
#165Wouldn't .htaccess solve this issue?
Re: Password protect a static HTML page
#166Does anyone know of a way to do something like this but with OAuth? E.g. log in with GitHub to view these docs.
The solution (with a server) is: https://oauth2-proxy.github.io/oauth2-proxy/
Re: Password protect a static HTML page
#167- Password in plaintext in the source e.g. "if(password=='hunter2') ..."
- No correlation between password and page contents (either the content is merely hidden and shown when the password check succeeds, or lightly obfuscated/encrypted using key independent of knowing the password)
- Hiding content by using "display:none" or similar
Re: Password protect a static HTML page
#168Use apache to serve your page and htpasswd to provide basic authentication. Easy 1994 answer
https://docs.nginx.com/nginx/admin-guide/security-controls/c...
Re: Password protect a static HTML page
#169Use apache to serve your page and htpasswd to provide basic authentication. Easy 1994 answer
I thought that too, but this appears like it works to password protect an html file that's *not* being served off a server. This ought to work with a file on disk too.
Re: Password protect a static HTML page
#170The use case for a document like this is a little different from .htaccess. This is something you can share, email, host, etc and have some security in transit and at rest. Yes, .htaccess password protects on the web server, but that is one specific use case and requires a lot of machinery and specific environment. JavaScript is everywhere. And this is a static HTML document in the sense that there is no server side…
Why not use a password protected word document if those are your use-cases?