password-protection

Password protecting a directory and all of it's subfolders using .htaccess

China☆狼群 提交于 2019-11-26 09:37:39
问题 I am trying to password protect a subdomain and all of it\'s subdirectories and files, but my knowledge on the matter is very limited, how can I go about doing that? 回答1: It's a simple two step process In your .htaccess put AuthType Basic AuthName "restricted area" AuthUserFile /path/to/the/directory/you/are/protecting/.htpasswd require valid-user use http://www.htaccesstools.com/htpasswd-generator/ or command line to generate password and put it in the .htpasswd Note 1: If you are using

How to remove .htaccess password protection from a subdirectory

谁说我不能喝 提交于 2019-11-26 07:58:50
问题 I have password protected my entire website using .htaccess but I would like to expose one of the sub directories so that it can be viewed without a password. How can I disable htaccess password protection for a sub directory? Specifically what is the .htaccess syntax. Here is my .htaccess file that is placed in the root of my ftp. AuthName \"Site Administratrion\" AuthUserFile /dir/.htpasswd AuthGroupFile /dev/null AuthName secure AuthType Basic require user username1 order allow,deny allow

HTTP authentication logout via PHP

守給你的承諾、 提交于 2019-11-26 01:41:59
问题 What is the correct way to log out of HTTP authentication protected folder? There are workarounds that can achieve this, but they are potentially dangerous because they can be buggy or don\'t work in certain situations / browsers. That is why I am looking for correct and clean solution. 回答1: Mu. No correct way exists , not even one that's consistent across browsers. This is a problem that comes from the HTTP specification (section 15.6): Existing HTTP clients and user agents typically retain

Non-random salt for password hashes

﹥>﹥吖頭↗ 提交于 2019-11-26 00:45:40
问题 UPDATE: I recently learned from this question that in the entire discussion below, I (and I am sure others did too) was a bit confusing: What I keep calling a rainbow table, is in fact called a hash table. Rainbow tables are more complex creatures, and are actually a variant of Hellman Hash Chains. Though I believe the answer is still the same (since it doesn\'t come down to cryptanalysis), some of the discussion might be a bit skewed. The question: \"What are rainbow tables and how are they

SQLite with encryption/password protection

落花浮王杯 提交于 2019-11-26 00:11:43
问题 I\'m just learning to use SQLite and I was curious if such is possible: Encryption of the database file? Password protect opening of the database? PS. I know that there is this \"SQLite Encryption Extension (SEE).\", but according to the documentation, \"The SEE is licensed software....\" and \"The cost of a perpetual source code license for SEE is US $2000.\" 回答1: SQLite has hooks built-in for encryption which are not used in the normal distribution, but here are a few implementations I know

How do you use bcrypt for hashing passwords in PHP?

夙愿已清 提交于 2019-11-25 21:33:56
问题 Every now and then I hear the advice \"Use bcrypt for storing passwords in PHP, bcrypt rules\". But what is bcrypt ? PHP doesn\'t offer any such functions, Wikipedia babbles about a file-encryption utility and Web searches just reveal a few implementations of Blowfish in different languages. Now Blowfish is also available in PHP via mcrypt , but how does that help with storing passwords? Blowfish is a general purpose cipher, it works two ways. If it could be encrypted, it can be decrypted.