CSRF-Protector-PHP icon indicating copy to clipboard operation
CSRF-Protector-PHP copied to clipboard

403 Access Forbidden by CSRFProtector: when uploading files

Open elieobeid7 opened this issue 7 years ago • 2 comments

The structure is the following:

  • index.php - holds the html, redirects to controller.php
  • controller.php - handles the post request and take care of the uploads then redirects to index.php
  • pictures folder, chmod 755
  • CSRFProtector is included in all files, I use the default token csrfp_token

if I fill the form without uploading, everything is fine. If I upload a picture, I get

403 Access Forbidden by CSRFProtector!

I'm on windows 10 64 bit, using Firefox quantum and this library to handle uploads

https://github.com/samayo/bulletproof

elieobeid7 avatar Feb 03 '18 21:02 elieobeid7

This error is coming up at conroller.php is it?

mebjas avatar Feb 06 '18 05:02 mebjas

That's true, only when uploading files, so if no files are selected, everything is fine.

elieobeid7 avatar Feb 06 '18 09:02 elieobeid7