Additional validation and escaping for file names.
This adds additional front and backend validations for task order file names. We are now restricting file names to a whitelist regex of [A-Za-z0-9\-_ \.] for simplicity. Note: On the frontend, the filename string must have at least one character. This is not true in the backend validation; because of the way the entire task order form is validated, requiring input would break the business logic currently implemented.
This commit is contained in:
@@ -70,7 +70,7 @@ describe('UploadInput Test', () => {
|
||||
})
|
||||
|
||||
const component = wrapper.find(uploadinput)
|
||||
const event = { target: { value: '', files: [{ name: '' }] } }
|
||||
const event = { target: { value: '', files: [{ name: 'sample.pdf' }] } }
|
||||
|
||||
component.setMethods({
|
||||
getUploader: async () => new MockUploader('token', 'objectName'),
|
||||
|
Reference in New Issue
Block a user