Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always CSRF attack in deployment even after configuring MAX_VALUES #1274

Closed
christianlx opened this issue Oct 15, 2021 · 2 comments
Closed

Comments

@christianlx
Copy link

christianlx commented Oct 15, 2021

OCS Inventory version
Version : 2.9.1.2 from repository RedHat8 (RPM based installation). PHP v 7.3

Describe the bug
While uploading an MSI, always have the message "CSRF attacK" despite configuration of "max" values
If I upload an exe, no error message but also hanged with a blanked page.
Only happenend with a file with a size > 100 Mb

To Reproduce
all is working fine. Teledeploy is activated in GUI

I have already increased the parameters in "/etc/httpd/conf.d/ocsinventory-reports.conf"
php_value post_max_size 513m
php_value upload_max_filesize 512m

Also in "/etc/php.ini"
post_max_size = 513M
upload_max_filesize = 512M

Also find in /usr/share/ocsinventory-reports.userini
post_max_size = 513M
upload_max_filesize = 512M

also tried to change LimitRequestBody in /etc/httpd/conf.d/ocsinventory-reports.conf without success

Is there another file/folder/db to change this value ?

Log file (optional)
No error in logs (httpd and ocs activity log, just CSRF attack while uploading an MSI (280 Mb)

@charleneauger
Copy link
Member

Hi @christianlx ,

Are you using a classic PHP or PHP fpm ?
If you are using php fpm please note there is a dedicated configuration file.

Regards,
Charlene Auger

@christianlx
Copy link
Author

christianlx commented Nov 8, 2021

Hi Charlene,
thanks to have put me on the right direction, I had to create a specific ini file in /etc/php.d/ to have the upload max working properly.

Thanks and regards

@christianlx christianlx changed the title [BUG] always CSRF attack in deployment even after configuring MAX_VALUES Always CSRF attack in deployment even after configuring MAX_VALUES Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants