Reputation: 8075
Starting to learn Python's Flask web app framework, still on the learning curve, so please bear with me.
I am wondering how appropriate are the client-side sessions for secure web application purposes. From what it seems, there are some serious concerns:
So, perhaps the answer I am looking for, is the limits of Flask client-side sessions, considering possible man-in-the-middle attack (for non-secure http sessions, of course) or advanced malicious user who stores the cookie values for relaying them back at later time.
Upvotes: 1
Views: 3621
Reputation: 7078
I don't think you have to worry about the size as a cookie can't store more than 4KB of data anyway. I highly doubt you'll get anywhere close to that easily.
It's just as secure as other sessions, as in you can probably take the PHPSESSID
cookie to some other browser and have it work just as you can do it with this. Nothing prevents it. However there are workarounds this issue, you can have it expire after a time limit. See this question for example. It has useful answers regarding this issue.
You can always use a database session if you so desire. I'm sure there are other implementations you can find too.
Edit: Here are some others.
Upvotes: 1