Skip to content

fix: reject invalid binary form file metadata - #17149

Merged
Rich-Harris merged 1 commit into
version-3from
triage/kit-17147-invalid-file-metadata
Sep 18, 2026
Merged

Rich-Harris merged 1 commit into
version-3from
triage/kit-17147-invalid-file-metadata

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor

Summary

  • require binary-form file sizes, timestamps, and offset indices to be safe integers
  • reject negative sizes and offset indices before constructing LazyFile values
  • cover negative, fractional, NaN, infinite, and unsafe metadata values

Fixes #17147

Testing

  • cd packages/kit && pnpm vitest run -c vitest.kit.config.js src/runtime/form-utils.spec.js
  • pnpm -F @sveltejs/kit test:unit
  • pnpm lint
  • pnpm check
  • pnpm -F @sveltejs/kit prepublishOnly
  • pnpm format
  • git diff --check

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 7d8cdb9:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/7d8cdb931ac95a08bb9059e8f725b37afdd797a1

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17149

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7d8cdb9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris
Rich-Harris marked this pull request as ready for review September 18, 2026 18:11
@Rich-Harris
Rich-Harris merged commit 3a7d329 into sveltejs:version-3 Sep 18, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binary form File metadata allows invalid sizes

1 participant