slimphp / Slim-Csrf

Slim Framework CSRF protection middleware
MIT License
338 stars 58 forks source link

Bug in enforcing storage limit, grew too large in many cases. #140

Closed deployHuman closed 3 years ago

deployHuman commented 3 years ago

I had my storage limit to 10, and it grew way to large, only made size-check in specific cases. Moved the Check to when the script generates a new token pair

l0gicgate commented 3 years ago

This looks fine to me, @akrabat we never really benchmarked large storage use cases before so we missed this. Does that look okay to you?

akrabat commented 3 years ago

LGTM. I see no problem with enforcing the storage limit when generating the token in addition to when we do it in process.