How do you set up use HttpOnly cookies in PHP

后端 未结 10 1809
终归单人心
终归单人心 2020-12-04 07:09

How can I set the cookies in my PHP apps as HttpOnly cookies?

10条回答
  •  萌比男神i
    2020-12-04 07:38

    Be aware that HttpOnly doesn't stop cross-site scripting; instead, it neutralizes one possible attack, and currently does that only on IE (FireFox exposes HttpOnly cookies in XmlHttpRequest, and Safari doesn't honor it at all). By all means, turn HttpOnly on, but don't drop even an hour of output filtering and fuzz testing in trade for it.

提交回复
热议问题