Skip to content
Open
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
2 changes: 1 addition & 1 deletion packages/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@open-condo/config": "workspace:^",
"@open-condo/miniapp-utils": "workspace:^",
"express": "^4.21.2",
"file-type": "16.5.4",
"file-type": "21.3.2",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the file-type API usage

When this package is actually installed at v21, packages/files/detectMimeType.js still does const { fromFile } = require('file-type') and then calls fromFile(filepath), but file-type v21 exposes fileTypeFromFile instead of fromFile and documents the package as ESM. In the upload middleware path (packages/files/utils.js), this makes magic-number MIME detection fail for every uploaded file and fall back to the client/formidable MIME value, so spoofed or missing content types are no longer corrected.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update yarn.lock with the dependency bump

This changes the workspace manifest to require file-type 21.3.2, but the repo lockfile still only contains the @open-condo/files dependency on file-type: 16.5.4 and the file-type@npm:16.5.4 resolution. In environments that install with the checked-in lockfile/immutable installs, the dependency graph either stays pinned to the vulnerable old version or fails because the manifest and lockfile are out of sync.

Useful? React with 👍 / 👎.

"formidable": "^3.5.4",
"jsonwebtoken": "^9.0.0",
"zod": "^4.0.8"
Expand Down
Loading