| | |
Just how safe is a session based on a mysql field id for user indetifcation?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2007
Posts: 136
Reputation:
Solved Threads: 2
Hello all,
Just wanted to see if I am leaving open some security hole in a script I have! When the user logs in it creates a session based on the id field of the users table! For example .... my id is 10 so a session is created with based on that.
What I wanted to know is if I want a secure way to identify a genuine user based on their session then should I make this session more complicated by adding further details? Or even create multiple sessions?
I am currently checking the user against my sql table id against their session but thought that if someone created a session from another website with for example the number 10 then I wouldnt want them being able to access my members account whose ID number is 10!
Hope this makes sense and someone can clarify the best way around it
Thanks
Just wanted to see if I am leaving open some security hole in a script I have! When the user logs in it creates a session based on the id field of the users table! For example .... my id is 10 so a session is created with based on that.
What I wanted to know is if I want a secure way to identify a genuine user based on their session then should I make this session more complicated by adding further details? Or even create multiple sessions?
I am currently checking the user against my sql table id against their session but thought that if someone created a session from another website with for example the number 10 then I wouldnt want them being able to access my members account whose ID number is 10!
Hope this makes sense and someone can clarify the best way around it
Thanks
•
•
Join Date: Mar 2008
Posts: 152
Reputation:
Solved Threads: 19
Re: Just how safe is a session based on a mysql field id for user indetifcation?
0
#2 Jun 18th, 2009
Session is fairly safe but hackable.
Here's a decent rundown that may help you: http://www.sitepoint.com/blogs/2004/...sion-security/
Here's a decent rundown that may help you: http://www.sitepoint.com/blogs/2004/...sion-security/
Re: Just how safe is a session based on a mysql field id for user indetifcation?
0
#3 Jun 18th, 2009
![]() |
Similar Threads
- How to configure GD (PHP)
- code will not subtract negative number in mysql field? :( pls help! (PHP)
- php.ini confusion (PHP)
- prolem with sorting data in query based on date field (MySQL)
- Delphi file creator (Pascal and Delphi)
- Help: Need to access database when session times out (ASP.NET)
- question about connecting odbc to sql through php script (PHP)
Other Threads in the PHP Forum
- Previous Thread: how to Compress PHP into .zip or .tar
- Next Thread: Limit Drop Down Menu Options Based on Option Selected in Other Dropdown
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube






