Hello, i am hoping to get some opinions regarding php sessions. I am new to programming and i have learned alot over the past year of spare-time study. I've started using CSRF tokens with my forms and this requires me to store the data in a session. I have a member login system which also uses sessions.
my question: i have to use the session to store the csrf token data for comparison with the form submission but this means that i am using a session for my public (not logged in) pages. i don't see alot of sites using a session until login. i use Edge browser inspect element developer tools and i see cookies and some cookies are session exxpiration but that doesn't mean that a session is used. my concern with using a session is that if a hacker or malicious user was able to generate millions of requests with different ips, then the disk would be filled with session files and my site would be unavailable. how can i deal with such a scenario? am i the only one using public page sessions?
thank you for any replies.