Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 OWASP 网站上,他们的前十项之一指出,我们应该考虑在成功的身份验证或权限级别更改后重新生成一个新会话。
这样做的正确方法是什么?
一位同事告诉我但我没有测试过的一件事是,当用户使用浏览器选项卡时,每个选项卡都没有自己的会话,所以我认为这会否定整个练习。
谢谢,保罗斯佩兰萨
根据您使用的语言,您只需调用类似 session.invalidate() 的方法,然后重定向会创建一个新会话。