Tuesday, June 28, 2011

Insecure Cookies

To make Drupal Cookies Secure,
Edit drupal.js  and add  secure; HttpOnly; for has_js cookie
 
If using Indic Script Module, edit  indic_script/js/common.js and modify the function is_set_cookie(name, value, expires, path, domain, secure) {

    var curCookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + escape(path) : "") +
        ((domain) ? "; domain=" + domain : "") +
        //((secure) ? "; secure" : "");
        "; secure; HttpOnly;"
    document.cookie = curCookie;  
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.