csaf_distribution icon indicating copy to clipboard operation
csaf_distribution copied to clipboard

csaf_provider: If root folder is not createable, Response is 400 but should be 500

Open wagner-intevation opened this issue 4 months ago • 0 comments

If the csaf_provider configuration file has a bad parameter

# Specify the root folder.
folder = bogousdirectoryname

(for example, a relative directory), the create action fails with a 400 Bad Request:

$ ./csaf-3.3.0-gnulinux-amd64/bin-linux-amd64/csaf_uploader --action create --url http://127.0.0.1/cgi-bin/csaf_provider.go ...
2025/07/30 17:49:39 WARN No config file found. Maybe you want to specify one or store it in a respective default location locations="[~/.config/csaf/uploader.toml ~/.csaf_uploader.toml csaf_uploader.toml]"
2025/07/30 17:49:39 Create failed: 400 Bad Request
2025/07/30 17:49:39 No CSAF files given.
Errors:
	mkdir bogousdirectoryname: permission denied

400 Bad Request is a client error. But the problem is on the server, so it should be 500 Internal Server Error.

wagner-intevation avatar Jul 31 '25 09:07 wagner-intevation