Allow upload of files with a .json postfix.

This commit is contained in:
Michael Kaye 2022-02-08 10:58:21 +00:00
parent 589e9254e7
commit 18c8a83173

View file

@ -402,7 +402,7 @@ func formPartToPayload(field, data string, p *parsedPayload) {
// * no silly characters (/, ctrl chars, etc) // * no silly characters (/, ctrl chars, etc)
// //
// * nothing starting with '.' // * nothing starting with '.'
var filenameRegexp = regexp.MustCompile(`^[a-zA-Z0-9_-]+\.(jpg|png|txt)$`) var filenameRegexp = regexp.MustCompile(`^[a-zA-Z0-9_-]+\.(jpg|png|txt|json)$`)
// saveFormPart saves a file upload to the report directory. // saveFormPart saves a file upload to the report directory.
// //