slimphp / Slim-Csrf

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

csrf in the header #121

Closed FvsJ101 closed 3 years ago

FvsJ101 commented 4 years ago

Hi will the package check if the csrf values are passed in the meta tags like what you can do in laravel?

xenogenesi commented 4 years ago

My mistake, it wasn't.

It seems to me that this has already been done https://github.com/slimphp/Slim-Csrf/pull/98, the middleware checks the headers https://github.com/slimphp/Slim-Csrf/pull/98/commits/6fed3bb99b5a44bfbde3f30320d17bfc3d3dd8c1.

kurgalinn commented 3 years ago

https://github.com/slimphp/Slim-Csrf/blob/b02835423b24c408f15d55bc1f027658dacb32e7/src/Guard.php#L408-L409

Hello, getParsedBody return null if use DELETE method.

Based on this (https://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request) I can't use CSRF protection for DELETE method?

l0gicgate commented 3 years ago

I’m closing this as stale