trongate / trongate-framework

The Trongate PHP framework
https://trongate.io
Other
1.11k stars 100 forks source link

Minor fix to CSRF token #156

Closed DaFa66 closed 9 months ago

DaFa66 commented 9 months ago

It appeared that the newer version of form_helper.php is generating a new CSRF token each time form_close() is called. This was the reason for the issue we were facing with the single image uploader, as a new token was being generated before the form was submitted, leading to a mismatch during validation. Therefore the fix would be to only generate a CSRF token once per session. Thanks to michidesign for spotting this and letting us know via the Help_Bar on Trongate.io

Please give Trongate a star on GitHub!

trongate commented 9 months ago

Thank you!