Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Don't check the mimetype via content.file.mimetype #51

Merged
merged 1 commit into from
Aug 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,6 @@ async function generateReport(console, httpUrl, matrixFile, filePath, tempDir, s

if (matrixFile && matrixFile.key) {
console.info(`Decrypting ${filePath}, writing to ${decryptedFilePath}`);
console.info(`FileType: ${matrixFile.mimetype} [${filePath}]`);

// Do an initial check of the mimetype based on what is reported by the client
if (mimetypeArray && !mimetypeArray.includes(matrixFile.mimetype)) {
return {clean: false, info: 'File type not supported'};
}

// Decrypt the file
let decryptedFileContents;
Expand Down