Configuring File Upload Inspection
HAS inspects all uploaded files before they reach Hopex.
Files are scanned by antivirus through AMSI (Antimalware Scan Interface):
• Zip and Gzip archives are checked for entry names, encrypted content, nested archives, allowed file extensions, configured size limit, and entry count limit.
• Microsoft Office and OpenDocument files are also inspected, as these file formats are internally based as ZIP archives.
Example: DOCX, XLSX, PPTX, VSDX, and ODT.
Any file that fails the inspection is rejected and never reaches Hopex.
Files that pass the inspection are uploaded unchanged. SHA-256 integrity checks ensure that the uploaded and downloaded files are identical.
You can modify the file upload inspection default settings:
• Maximum number of entries
Maximum number of entries, including directories, allowed for an entire upload request, taking into account all uploaded archives and their inspected nested documents.
Values: 1 - 10 000 (default: 5000).
• Maximum uncompressed size of one entry (MiB)
Maximum amount of data that can be decompressed from a single archive entry. Entries exceeding this limit are rejected during inspection.
Values: 1 - 256 (default: 100).
• Maximum total uncompressed size (MiB)
Maximum amount of data that can be decompressed for an entire upload request, including all uploaded archives and their inspected nested documents.
Values: 1 - 1024 (default: 250).
• Maximum compression ratio
Compression ratio above which an archive entry is reported in the logs. Only entries larger than 1 MiB are considered.
Values: 2 - 10 000 (default: 100).
• Maximum entry name length
Maximum number of characters of an archive entry name.
Values: 16 - 4096 (default: 512).
• Maximum nested document depth
Maximum number of nested document containers (for example, embedded Microsoft Office documents) that can be inspected within an uploaded file.
Nested archive files (such as a ZIP file contained withing another ZIP file) are always rejected.
Values: 0 - 3 (default: 2).
• Maximum inspection duration (seconds)
Maximum time allowed to inspect all archives for an entire upload request. The timer starts when the first archive is inspected. Upload requests exceeding this limit are rejected.
Values 1 - 120 (default: 90).
• Scan each archive entry with the antivirus
Decompresses and scans each archive entry individually in the upload quarantine. This option provides consistent archive inspection regardless of antivirus provider capabilities.
Default: selected.
• Accept Office and OpenDocument files inside archives
When enabled, Microsoft Office and OpenDocument files (e.g.: DOCX, XLSX, PPTX, PPSX, SLDX, VSDX, and ODT) found in uploaded ZIP archives are inspected recursively as nested documents instead of being rejected as nested archives.
The same inspection rules apply as for files uploaded directly, a valid document structure is required, and the document contents count toward the upload request limits.
Password-protected or encrypted documents cannot be inspected. Such files are accepted as opaque documents after their file structure has been validated and are scanned only by the antivirus.
Default: selected.
• Allowed archive entry extensions
Optional comma-separated list of file extensions allowed within uploaded ZIP archives. This list further restricts the extensions already allowed by the engine upload allowlist (mime_upload.json, extensionWhitelist), excluding archive and executable file types.
It can only remove allowed extensions from the existing allowlist and cannot be used to add new ones. If left empty or if the value is invalid, no additional restrictions are applied.
Default: empty.
To configure the file upload inspection:
1. Access the HAS Console.
2. Select Modules > Module Settings navigation menu.
3. Access the Upload ZIP inspection settings row and click Edit
.
4. Ensure that Enable ZIP upload inspection is selected.
5. Modify the configuration as required.
6. Click Submit.
Disabling the antivirus scanning
This security control allows uploaded files to reach HOPEX without antivirus scanning.
Disabling the security control bypasses antivirus scanning and allows uploaded files to reach Hopex unchecked.
To disable the antivirus scanning:
1. Access the HAS Console.
2. Select Modules > Module Settings navigation menu.
3. Access the Upload malware scanning settings row and click Edit
.
4. Clear Enable upload malware scanning.
Disabling authentication before upload scanning
When enabled HAS authenticates upload requests using the authentication schemes configured for the target destination before processing the request body.
Unauthenticated requests are rejected with an HTTP 401 response and are not staged in the upload quarantine.
Disabling this option allows unauthenticated requests to consume quarantine storage space and antivirus scanning resources.
To disable authentication before upload scanning:
1. Access the HAS Console.
2. Select Modules > Module Settings navigation menu.
3. Access the Upload malware scanning settings row and click Edit
.
4. Clear Require authentication before upload scanning.
Configuring the upload quarantine root directory
You can define an absolute directory used for the HAS upload quarantine.
The web root and instance temporary data directories are not allowed. HAS automatically appends the instance port and applies restrictions to the corresponding instance subdirectory.
To configure the upload quarantine root directory:
1. Access the HAS Console.
2. Select Modules > Module Settings navigation menu.
3. Access the Upload malware scanning settings row and click Edit
.
4. In the Upload quarantine root directory enter the location path.
If left empty, the Quarantine subdirectory in the current instance's LocalData directory is used.