Hack Forums
Password Protect - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141)
+---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50)
+---- Thread: Password Protect (/showthread.php?tid=3212844)



Password Protect - GreenSoap - Jan 27, 2013

Hi I've made this notepad at http://lukes.netii.net/ and people can make new notes by putting /?file=example.txt at the end of the URL, but if someone makes a easy to guess file like 1.txt anyone can find & edit it.

On my notepad I only want one new thing;

I want a Textbox at the bottom that says "Enter Password (Optional)" if a user enters a pass it password protects that note, but if no password is entered the note is not protected?

Example: this note /?file=protect.txt is password protected, everytime someone tries to goto it they have to enter the password to edit or view it?


* - Jαmes - Jan 27, 2013

You could do one of the following:

1. Use a database and save all of the passwords in it. If the person has a password on their notepad then it will save into the database and check if their passwords is correct when they try to reopen it.
2. Encrypt the data with their password which means that you could check if the decrypt value is correct or not and then continue if it is.