Skip to content

✨ Limit max_response_size (backport 0.2) #447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 21, 2025

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Apr 21, 2025

Backports #444 to v0.2-stable.

nevans added 3 commits April 20, 2025 23:04
_Please note:_ this only limits the size per response.  It does _not_
limit how many unhandled responses may be stored on the responses hash.
Note that this cherry-picked commit is missing key paits that are
incompatible with net-imap before 0.4.  I'm keeping the conflict
resolution here, and the updates for net-imap 0.3 in the next commit.

------

Though it would be useful to also have limits based on response type and
what commands are currently running, that's out of scope for now.

_Please note:_ this only limits the size per response.  It does _not_
limit how many unhandled responses may be stored on the responses hash.
@nevans nevans changed the title ✨ Limit max_response_size ✨ Limit max_response_size (backport 0.2) Apr 21, 2025
For the net-imap v0.3 backport, two major changes were needed:
* the tests needed to be almost completely rewritten because FakeServer
  was added for v0.4.
* `max_response_size` needed to be on Net::IMAP directly, because Config
  was added for v0.4.
@nevans nevans force-pushed the backport/v0.2-max_response_size branch from 7d22a6a to 673cab8 Compare April 21, 2025 11:03
@nevans nevans added enhancement New feature or request backport This issue or PR is for a stable release branch labels Apr 21, 2025
@nevans nevans merged commit 7d03b0f into v0.2-stable Apr 21, 2025
26 checks passed
@nevans nevans deleted the backport/v0.2-max_response_size branch April 21, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport This issue or PR is for a stable release branch enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant