ansible / galaxy-dev

Ansible Automation Hub
11 stars 13 forks source link

Artifact Upload: invalid filenames cause 500 without error message #244

Closed ironfroggy closed 4 years ago

ironfroggy commented 4 years ago

Bug Report

SUMMARY

When uploading artifacts to the V3 upload endpoint and uploading a filename that does not match the prescribed namespace-name-version.tar.gz pattern, a 500 response is returned indicating an unhandled internal error and no proper reporting of the issue.

STEPS TO REPRODUCE
EXPECTED RESULTS

An error about the filename indicating the problem, as it cannot be matched with its expected namespace OR The namespace, name, and version to be used from the metadata and the filename ignored.

Note: please clarify the intended result and follow up with QE.

ACTUAL RESULTS

500 Internal Server Error and no clear information

alikins commented 4 years ago

Fixed by 980728f79e56d2a08dd673389944d18c7afb83af

Now returns a 400 error with info about the filename and the error, and logs that info as well.

screenshot_example_bad_filename

ironfroggy commented 4 years ago

Test passes 👍