开发者

what is document.cookie="sess="; document.location="/"?

开发者 https://www.devze.com 2023-03-13 00:56 出处:网络
You log in to a开发者_JAVA技巧n application and the server sets the following cookie: Set-cookie: sess=ab11298f7eg14;

You log in to a开发者_JAVA技巧n application and the server sets the following cookie: Set-cookie: sess=ab11298f7eg14; When you click the logout button, this causes the following client-side script to execute: document.cookie="sess="; document.location="/"; What conclusion would you draw from this behaviour?


That they are using session ids stored in a cookie for authorization. When you logout, they reset the value of the cookie named "sess" (the wrong way, they should use a negative expiration date instead of a empty value to delete it). They den redirect you to "/", ie their start page.

0

精彩评论

暂无评论...
验证码 换一张
取 消