Changelog - 2026-11-06
Object keys and bucket names refuse control and bidirectional characters
Security Bug FixIn one line. A key or bucket name could hold a tab, a delete character or a right-to-left override. They are refused now, and the same set applies to original file names.
What changed
- Segments.
isValidSegment(and soisValidObjectKeyandisValidBucketName) refuses any control character (Unicode category Cc), a lone surrogate, and the bidirectional marks and overrides (U+061C, U+200E, U+200F, U+202A to U+202E, U+2066 to U+2069). It used to refuse only newline, carriage return and NUL. - Original names.
isValidOriginalNamerefuses the bidirectional set too. - Log line. The refusal logs the length of the name, not the name.
- Other text is unchanged. Names in any script (
ảnh đẹp.png,файл.txt) stay valid.
Who is affected
- Keys that held one of those characters. They are refused on the next call; rename them.
- Everyone else. No action needed.
Details
| File | Package |
|---|---|
src/modules/storage/base.ts | helpers |