TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 06-27-2009, 01:00 AM   #1 (permalink)
The Contributor
 
cecilia's Avatar
 
Join Date: May 2009
Location: LA, CA
Posts: 87
Thanks: 0
cecilia is on a distinguished road
Default username and password

I know this sounds so basic but... Im just wondering if this approach is right, Id really like to know if I did something wrong. Its the way users log in:


1. Users login at login.php.

2. It gets submitted to home.php which has validate.php included at the top which checks the database for the user and password match. The sanitation for all the POSTs is there too.

3. The validate.php is on every page from then on and the login/password gets passed through the pages as hidden POSTs. So on every page, it gets checked - the user and password match.

4. If you dont get the password right you just get bounced back to the login.



What was I thinking back then:

1. Im passing the password and the user instead of just posting loginsuccessful = 1, coz users can just modify this right?

2. Im making it check every page too in case the user is already logged in, and I need to kick him/her out of the site for some reason.

3. I didnt use GET, sessions and cookies coz I read they can be hijacked so its not safe. So all I have left was the POST.


Thanks
cecilia is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Hashing Normo General 5 12-17-2008 11:00 AM
vBulletin: Problem with register : "That username is already in use or does..." Fpac.afrikano Feedback 1 11-29-2008 03:58 PM
Password salts h0ly lag General 9 06-27-2008 07:27 PM
Single way password storage DragonBe General 3 11-21-2007 01:42 PM
Cryptography's Sodium Chloride Wildhoney Tips & Tricks 7 09-26-2007 05:19 PM


All times are GMT. The time now is 01:03 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design