Bump net-imap from 0.5.1 to 0.5.6
Bumps net-imap from 0.5.1 to 0.5.6.
Release notes
Sourced from net-imap's releases.
v0.5.6
What's Changed
🔒 Security Fix
Fixes CVE-2025-25186 (GHSA-7fc5-f82f-cx69): A malicious server can exhaust client memory by sending
APPENDUIDorCOPYUIDresponses with very largeuid-setranges.Net::IMAP::UIDPlusDataexpands these ranges into arrays of integers.Fix with minor API changes
Set
config.parser_use_deprecated_uidplus_datatofalseto replaceUIDPlusDatawithAppendUIDDataandCopyUIDData. These classes store their UIDs asNet::IMAP::SequenceSetobjects (not expanded into arrays of integers). Code that does not handleAPPENDUIDorCOPYUIDresponses should not see any difference. Code that does handle these responses may need to be updated.For v0.3.8, this option is not available For v0.4.19, the default value is
true. For v0.5.6, the default value is:up_to_max_size. For v0.6.0, the only allowed value will befalse(UIDPlusDatawill be removed from v0.6).Mitigate with backward compatible API
Adjust
config.parser_max_deprecated_uidplus_data_sizeto limit the maximumUIDPlusDataUID set size. Whenconfig.parser_use_deprecated_uidplus_data == true, larger sets will crash. Whenconfig.parser_use_deprecated_uidplus_data == :up_to_max_size, larger sets will useAppendUIDDataorCopyUIDData.For v0.3,8, this limit is hard-coded to 10,000. For v0.4.19, this limit defaults to 1000. For v0.5.6, this limit defaults to 100. For v0.6.0, the only allowed value will be
0(UIDPlusDatawill be removed from v0.6).Please Note: unhandled responses
If the client does not add response handlers to prune unhandled responses, a malicious server can still eventually exhaust all client memory, by repeatedly sending malicious responses. However,
net-imaphas always retained unhandled responses, and it has always been necessary for long-lived connections to prune these responses. This is not significantly different from connecting to a trusted server with a long-lived connection. To limit the maximum number of retained responses, a simple handler might look something like the following:limit = 1000 imap.add_response_handler do |resp| next unless resp.respond_to?(:name) && resp.respond_to?(:data) name = resp.name code = resp.data.code&.name if resp.data.is_a?(Net::IMAP::ResponseText) imap.responses(name) { _1.slice!(0...-limit) } imap.responses(code) { _1.slice!(0...-limit) } endAdded
- 🔧 Ensure ResponseParser config is mutable and non-global by
@nevansin ruby/net-imap#381- ✨ Add SequenceSet methods for querying about duplicates by
@nevansin ruby/net-imap#384- ✨ Add
SequenceSet#each_ordered_numberby@nevansin ruby/net-imap#386- ✨ Add
SequenceSet#find_ordered_indexby@nevansin ruby/net-imap#396- ✨ Add
SequenceSet#ordered_atby@nevansin ruby/net-imap#397- ✨ Add AppendUIDData and CopyUIDData classes by
@nevansin ruby/net-imap#400- 🔧 Add parser config for
APPENDUID/COPYUID, 🗑️ Deprecate UIDPlusData by@nevansin ruby/net-imap#401Fixed
- 🐛 Fix
SequenceSet#appendwhen its@stringis nil by@nevansin ruby/net-imap#376- 🐛 Fix SequenceSet merging in another SequenceSet by
@nevansin ruby/net-imap#377- 🐛 Fix SequenceSet count dups with multiple "*" by
@nevansin ruby/net-imap#387
... (truncated)
Commits
62710b9🔖 Bump version to 0.5.670e3dddMerge commit from forke58aff6🔧 Add:up_to_max_sizeconfig for UIDPlusData2f58d02🔧 Add config option for max UIDPlusData sizec674700🔒 Limit exponential memory usage to parse uid-set60f5776🔧🗑️ Deprecate UIDPlusData, with config to upgrade8f41dea🔀 Merge pull request #400 from ruby/add-appenduid-copyuid-classesbcb261d✨ Add CopyUIDData (to replace UIDPlusData)01bb49f✨ Add AppendUIDData (to replace UIDPlusData)85d0aa2🚚 Rename UIDPLUS test file for consistency- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.