Skip to content

fix(multipart): set cap for parser buffering - #4025

Merged
JohnTitor merged 1 commit into
actix:mainfrom
JohnTitor:limit-multipart-buffering
Apr 17, 2026
Merged

fix(multipart): set cap for parser buffering#4025
JohnTitor merged 1 commit into
actix:mainfrom
JohnTitor:limit-multipart-buffering

Conversation

@JohnTitor

Copy link
Copy Markdown
Member

PR Type

PR_TYPE

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

Make poll_stream defensive not to consume malformed requests. This adds some configurable limits around it. Pooling logic has rewritten largely but it now only consumes following limit instead of inf-looping.

@github-actions github-actions Bot added the A-multipart project: actix-multipart label Apr 17, 2026
@JohnTitor
JohnTitor merged commit be62050 into actix:main Apr 17, 2026
15 checks passed
@JohnTitor
JohnTitor deleted the limit-multipart-buffering branch April 17, 2026 15:24
/// [`Multipart`] extractor configuration.
///
/// Add to your app data to have it picked up by [`Multipart`] extractors.
#[derive(Clone, Copy, Debug)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

risky to add Copy to structs like this in case we want to add some sort of common thing like boxed customizer function for something

@JohnTitor JohnTitor Apr 25, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fair enough, addressed in #4047

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-multipart project: actix-multipart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants