I have got a list of security violations for my website from security team. It says
Cookie without HttpOnly flag set
Autocomplete Password Enabled
So, what is this basically? Can I overcome this in my Drupal 7 site?
I have got a list of security violations for my website from security team. It says
Cookie without HttpOnly flag set
Autocomplete Password Enabled
So, what is this basically? Can I overcome this in my Drupal 7 site?
Ask for the actual security report. They often contain explanations about what the problem really is, as well as offering a solution.
I believe this will take care of the password autocomplete issue; I have a client who requires this and have it deployed on a few sites.
function mymodule_form_alter (&$form, &$form_state, $form_id)
{
// http://www.midwesternmac.com/blogs/jeff-geerling/disabling-autocomplete-forms
if ($form['#id'] == 'user-login') {
$form['#attributes']['autocomplete'] = 'off';
}
}
From the documentation for session.cookie_httponly
(you should set this flag to true in your php.ini
file):
Marks the cookie as accessible only through the HTTP protocol. This means that the cookie won't be accessible by scripting languages, such as JavaScript. This setting can effectively help to reduce identity theft through XSS attacks (although it is not supported by all browsers).
php_flag
directive in a .htaccess
file.
Commented
Dec 21, 2011 at 13:52