wazuh / wazuh-api

Wazuh - RESTful API
https://wazuh.com
GNU General Public License v2.0
68 stars 57 forks source link

Increase filesize limit #487

Closed AdriiiPRodri closed 4 years ago

AdriiiPRodri commented 4 years ago

Hi team,

This PR closes #486. In this PR, we have increase the maximun allowed size of the files to be uploaded from 1mb to 10mb. This change applies to:

File info

adriiiprodri@wazuh ls -l --block-size=M test.txt
-rw-r--r-- 1 adriiiprodri adriiiprodri 2M May 12 15:59 test.txt

Before

adriiiprodri@wazuh curl -k -u foo:bar -X POST -H 'Content-type: application/octet-stream' --data-binary @test.txt "https://localhost:55000/manager/files?path=etc/lists/new-list&overwrite=true"
{"error":701,"message":"Size of XML file is too long"}

After

adriiiprodri@wazuh curl -k -u foo:bar -X POST -H 'Content-type: application/octet-stream' --data-binary @test.txt "https://localhost:55000/manager/files?path=etc/lists/new-list&overwrite=true"
{"error":0,"data":"File updated successfully"}