How to encrypt session id in cookie?

后端 未结 8 1541
春和景丽
春和景丽 2021-02-06 05:43

While I was reading about session hijacking articles, i learned that it would be nice to encrypt session id value that is stored in a cookie.

As far as I know, when I s

8条回答
  •  执念已碎
    2021-02-06 06:19

    Make this script, access it from a web browser, then check your cookies.

    
    

    You will likely see something like this

    Site         Cookie      Value
    mysite.com   PHPSESSID   6fktilab3hldc5277r94qh2204
    

    PHP does a fine job if generating a nice, unique id. There's not point in encrypting this.

提交回复
热议问题