Jump to content

[SOLVED] Cookies ok for passwords?


MichaelMackey

Recommended Posts

Hi, I'm working on a system that has already been setup.  Security isn't a massive issue (not money/etc involved), but it would still be nice to get the best security I can with what's available.  The passwords are not setup as passwords in the database so I'm dealing with them as basic strings. 

 

Are cookies an ok way for a moderate security site to pass passwords between pages?  Is there another option that won't require me changing a great deal of what was already setup?  I am new to php so I'm not too aware of all the functionality it + javascript may have.

Link to comment
Share on other sites

Cookies are insecure, sessions would be better,

also you should MD5 the passwords, you may not think its important but manu users use the same password and if a hacker get their password from your site.. you could get in trouble..

 

if you added an extra field in the users database table called "accesslevel" or something like that.. if its set to 1 then that top level and 5 could be normal user.. when they login it could store the accesslevel in a session and user that to check rights..

 

if you use cookies anyone could edit their cookie to be an admin.. (or change the userid to be you)

 

hope that helps

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.