php - Session cookies http & secure flag - how do you set these? -


just received results of security audit - clear apart 2 things

session cookie without http flag.

session cookie without secure flag set.

the application coded in php , suggestions fix are:

  1. set session cookie http flag
  2. set session cookie secure flag

i have looked @ examples don't understand how implement on linux server. don't have access .ini file . possible set these in htaccess file?

alternatively, how , implement in code?

since asked .htaccess, , setting php_ini_all, put in .htaccess:

php_value session.cookie_httponly 1 php_value session.cookie_secure 1 

note session cookies sent https requests after that. might come surprise if lose session in non-secured http page (but pointed out in comments, point of configuration in first place...).


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -