I'm trying to set a secure session for a login interface and I'm checking if some hashed value saved on the $_COOKIE
and in $_SESSION
matches in both arrays. I need to change the value of the cookie via javascript to simulate an attack and check if my secure session works (if that is even possible, of course). Deleting the cookie wont work because I have a different validation for when the cookies doesnt exist.
Is it possible to modify a cookie's value via javascript and if so, how to?