PHP Can a client ever set $_SESSION variables?

后端 未结 4 1068
谎友^
谎友^ 2020-12-30 00:48

Is there any scenario where a client/user/hacker can set $_SESSION variables themselves (excluding malicious software running on a server computer. I mostly mea

4条回答
  •  被撕碎了的回忆
    2020-12-30 01:02

    Yes if you were assigning $_SESSION variables directly to unfiltered user input.

    Which brings me to my point: NEVER TRUST INPUT FROM THE USER. EVER

    If indeed you are filtering the input, then I don't see how it could be done.

提交回复
热议问题