TASVideos / tasvideos

The code for the live TASVideos website
https://tasvideos.org/
GNU General Public License v3.0
63 stars 29 forks source link

Change the AntiforgeryToken Cookie from SameSite Strict to Lax #1793

Closed Masterjun3 closed 4 months ago

Masterjun3 commented 4 months ago

If the token isn't Lax, if a user visits certain pages on TASVideos from outside (like a google link), the server would refresh your token, which would invalidate all old tabs' tokens, which gives a 400 Error when submitted.

This way the token will not be refreshed so easily. And there is no need to make the token Strict anyway, because the token in the HTML is the critical point of safety.