Why does codeigniter store its sessiondata in a cookie?

前端 未结 4 885
無奈伤痛
無奈伤痛 2020-12-21 10:21

Why does Codeigniter do this? I mean isn\'t it very insecure if users can see which data is stored in their session? And and what if they change a value in the cookie?

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-21 10:48

    Well, it's data about the user. If they want to change it... so what? I don't see how it's "insecure".

    You can encrypt session data, or use databases for session data integrity verification.

    The documentation is your friend; use it.


    For what it's worth, it does seem daft that native PHP sessions aren't used. The documentation claims that this offers "more flexibility" to developers, but given the caveats listed on that page, I can't imagine how.

提交回复
热议问题