Session hijacking and PHP

后端 未结 3 578
日久生厌
日久生厌 2020-11-30 04:36

Lets just consider the trust that the server have with the user.

Session fixation: To avoid the fixation I use session_regenerate_id() ONLY in authentic

3条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 05:12

    I would also suggest storing the user agent and ip information in the session, and verifying it on each request. It's not bullet-proof, but it is a fairly significant increase in robustness. While UA forging is really easy, IP forging, while possible, is MUCH harder... But you may have issues with users who are behind a round-robin IP system such as AOL users...

提交回复
热议问题