@bymax-one/nest-storage 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.mjs +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,21 @@ note on each entry is the compatibility contract — read it, not the number.
|
|
|
13
13
|
|
|
14
14
|
## [Unreleased]
|
|
15
15
|
|
|
16
|
+
## [1.1.9] - 2026-11-09
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **The MIME whitelist now refuses control and non-ASCII characters in the parameter part of a
|
|
21
|
+
content type.** The parameters after `;` were accepted if they held no comma and no line break, so
|
|
22
|
+
a value such as `text/plain; charset=café` or one with a NUL passed the whitelist, although
|
|
23
|
+
RFC 9110 field values are tab, space and printable ASCII (obsolete text aside). The parameter part
|
|
24
|
+
may now hold only tab, space and printable ASCII other than the comma.
|
|
25
|
+
|
|
26
|
+
**Apply to a derived backend:** with `validation.mimeWhitelist` set, a `contentType` whose
|
|
27
|
+
parameters hold any other character now fails with `STORAGE_MIME_NOT_ALLOWED`. A type with
|
|
28
|
+
ordinary parameters, such as `text/plain; charset=utf-8`, is unaffected. Without a whitelist
|
|
29
|
+
nothing changes: the value is passed on as given.
|
|
30
|
+
|
|
16
31
|
## [1.1.8] - 2026-11-06
|
|
17
32
|
|
|
18
33
|
### Fixed
|
|
@@ -623,4 +638,5 @@ have regressed from. They are kept because the reasoning is worth having.
|
|
|
623
638
|
[1.1.6]: https://github.com/bymaxone/nest-storage/compare/v1.1.5...v1.1.6
|
|
624
639
|
[1.1.7]: https://github.com/bymaxone/nest-storage/compare/v1.1.6...v1.1.7
|
|
625
640
|
[1.1.8]: https://github.com/bymaxone/nest-storage/compare/v1.1.7...v1.1.8
|
|
626
|
-
[
|
|
641
|
+
[1.1.9]: https://github.com/bymaxone/nest-storage/compare/v1.1.8...v1.1.9
|
|
642
|
+
[Unreleased]: https://github.com/bymaxone/nest-storage/compare/v1.1.9...HEAD
|
package/dist/server/index.cjs
CHANGED
|
@@ -824,7 +824,7 @@ async function readStreamUpTo(source, maxBytes) {
|
|
|
824
824
|
}
|
|
825
825
|
|
|
826
826
|
// src/server/utils/mime-match.ts
|
|
827
|
-
var SINGLE_MEDIA_TYPE = /^[ \t]*[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+[ \t]*(?:;[
|
|
827
|
+
var SINGLE_MEDIA_TYPE = /^[ \t]*[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+[ \t]*(?:;[\t \x21-\x2B\x2D-\x7E]*)?$/;
|
|
828
828
|
function mimeMatches(mime, whitelist) {
|
|
829
829
|
if (typeof mime !== "string" || !SINGLE_MEDIA_TYPE.test(mime)) {
|
|
830
830
|
return false;
|
package/dist/server/index.mjs
CHANGED
|
@@ -822,7 +822,7 @@ async function readStreamUpTo(source, maxBytes) {
|
|
|
822
822
|
}
|
|
823
823
|
|
|
824
824
|
// src/server/utils/mime-match.ts
|
|
825
|
-
var SINGLE_MEDIA_TYPE = /^[ \t]*[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+[ \t]*(?:;[
|
|
825
|
+
var SINGLE_MEDIA_TYPE = /^[ \t]*[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+[ \t]*(?:;[\t \x21-\x2B\x2D-\x7E]*)?$/;
|
|
826
826
|
function mimeMatches(mime, whitelist) {
|
|
827
827
|
if (typeof mime !== "string" || !SINGLE_MEDIA_TYPE.test(mime)) {
|
|
828
828
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bymax-one/nest-storage",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "Provider-agnostic S3-compatible object storage for NestJS. Works with AWS S3, DigitalOcean Spaces, Cloudflare R2, Backblaze B2, MinIO, Wasabi.",
|
|
5
5
|
"author": "Bymax One <support@bymax.one>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"check:api": "node scripts/check-api-surface.mjs",
|
|
49
49
|
"check:exports": "attw --pack . --profile strict",
|
|
50
50
|
"check:mutants": "node scripts/check-mutation-directives.mjs",
|
|
51
|
+
"check:file-length": "node scripts/check-file-length.mjs",
|
|
51
52
|
"check:published": "node scripts/check-published-surface.mjs",
|
|
52
53
|
"check:runtime": "node scripts/check-consumer-runtime.mjs",
|
|
53
54
|
"clean": "rm -rf dist coverage",
|