Skip to content

Web validator allows non-zip files to be uploaded #1440

@jcpitre

Description

@jcpitre

Describe the bug

The web validator allows files that are not zip to be uploaded and it tries to validate them.
The resulting report correctly states that the file is unknown, missing, etc.

Steps/Code to Reproduce

  • On the web validator, click on Choose a file.... This should open the file selector.
  • On the file selector, change the format to all files so all files are selectable instead of only the zip files.
  • Select any file that is not a proper zip file. This will give the correct error message that only zip files are accepted. And the selected file will not appear in the file field (as it should be).
  • Click Validate. The file with the improper content is uploaded and a report is generated

Expected Results

The result should be the same as when the Validate button is clicked when no file was selected. A message should say Please include a file to validate.

Actual Results

The file is uploaded and a report is generated

Screenshots

No response

Files used

Use any file that is not a valid zip file, preferably a short one so upload will be fast.

Validator version

4.1.1-SNAPSHOT

Operating system

MacOS

Java version

No response

Additional notes

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working (crash, a rule has a problem)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions