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.
我对 Web 开发场景非常陌生,但我想知道:有人知道 ZK 框架使用什么机制来防止会话劫持吗?
如果您使用 ZK 和 ZK Spring Security,它将透明地为您处理。
机制很简单。最终用户登录后,将创建一个新会话,并将旧会话中的所有属性复制到新会话中(以保持状态)。然后旧会话无效,最终用户从此开始使用新会话。因为“坏人”的旧会话号已经失效,“坏人”没有办法劫持会话。