Jump to content

Sequre login with cookies.


ram4nd

Recommended Posts

ctype_alnum is about registering. But min and max are a start.

 

1) Username min 3 char, max 12

2) Password min 6, max 15

 

I have to make a hash from that password, what is the most secure hash? What kind of a data should I keep in cookie, cause it's on client side. Should I save ip on every login. Like if user types 5 times password wrong, then do something.

no sir you need to check char type on all forms where applicable to keep the form from being a point of attack not just at one point. 

ctype_alnum is about registering. But min and max are a start.

 

1) Username min 3 char, max 12

2) Password min 6, max 15

 

I have to make a hash from that password, what is the most secure hash? What kind of a data should I keep in cookie, cause it's on client side. Should I save ip on every login. Like if user types 5 times password wrong, then do something.

Cookies are not as secure as sessions. Cookies should really only be used in correlation with session variables.

i found out the hard way sessions still require a cookie. so a session based sign in will not work with cookies turned off. the idea they are fully server side is a misconception and using $_GET or $_POST to pass the variable is not secure and an invite for hacks. i use sessions in all my sign ins without setting extra cookies, only the one set by session. i use char limits and requirements and life is good. a chat site i regular got hacked the other day and threats were made against my chatroom but im still up and running even after my logs showed an attempt to run a script on my site.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.