Answer the question
In order to leave comments, you need to log in
How to protect sessions and cookies?
I watched a lot of video courses on writing my own framework, and read books in English and Russian on information security. How exactly and from what to protect myself, I did not understand. Examples are banal, the code is too primitive, the essence is not disclosed. As if this is the strictest secret and you will find the best practic in few places. Xss, sql ingection, password hash are considered in self-writing) Here on the hub about csrf everything was laid out on the shelves. Of the courses I like, I will note Why these topics are not disclosed?
Kevin Scotland Creating Secure PHP Websites in use mcrypt it is already or will be removed from php
David
Powers Managing PHP Persistent Sessions SessionHandler in use
SessionHandler implements SessionHandlerInterface , SessionIdInterface{
/* Методы */
public close( void) : bool
public create_sid( void) : string
public destroy( string $session_id) : bool
public gc( int $maxlifetime) : int
public open( string $save_path, string $session_name) : bool
public read( string $session_id) : string
public write( string $session_id, string $session_data) : bool
}
Answer the question
In order to leave comments, you need to log in
Cookies are stored in the browser if you do not specify ssl?Cookies are stored in the browser, whatever you specify.
Sessions on the server, why do I have PHPSESSID in the browser?Sessions are stored on the server side. PHPSESSID - This cookie contains the session identifier SESS ion ID entifier (by the way, you can rename it as you like).
Lifetime until the browser is closedIf the "restore tabs at startup" option is enabled, then the cookie will not be deleted. And some plugins do it.
Can a session id be passed by url?Maybe.
Help pliz 2 years I fight (It's amazing that in two years you haven't even read what sessions are and how to store passwords .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question