Purpose of sha256 hashing a sessionId #1746
Answered
by
moshetanzer
moshetanzer
asked this question in
Help
-
Hi, if session is is being generated let’s say using uuid 4 and being saved in db and creating a cookie. What is the difference if you sha256 it first or you don’t. It can’t be unhased and is a random value? |
Beta Was this translation helpful? Give feedback.
Answered by
moshetanzer
Nov 14, 2024
Replies: 1 comment 8 replies
-
It's an additional protection if your database gets leaked, which has happened before with insecure backups. Not required but it's pretty easy to implement |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My mistake. He is setting actual cookie with token not with hash. See all the way at the end.