Releases: ruby/net-imap
v0.6.4
What's Changed
🔒 Security
This release contains fixes for multiple vulnerabilities concerning STARTTLS stripping, argument validation, and denial of service attacks.
Warning
#664 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Important
Argument validation is significantly improved. Several injection vulnerabilities have been fixed:
#657 fixes CRLF/command/argument injection via Symbol arguments (GHSA-75xq-5h9v-w6px).
#658 fixes CRLF/command/argument injection via the attr argument to #store/#uid_store (GHSA-hm49-wcqc-g2xg)
#659 fixes CRLF/command/argument injection via the storage_limit argument to #setquota (GHSA-hm49-wcqc-g2xg).
#660 fixes CRLF/command injection via RawData (GHSA-hm49-wcqc-g2xg):
#searchand#uid_searchsendcriteriaas raw data, when it is a String#fetchand#uid_fetchsendattras raw data, when it is a String.
Whenattris an Array, its String members are sent as raw data.
Caution
RawData does not defend against other forms of argument injection! It is an intentionally low-level API.
Note
Two denial of service vulnerabilities have been addressed.
These are generally only relevant when connecting to an untrusted hostile server (or without TLS).
#642 fixes quadratic time complexity when reading large responses containing many string literals (GHSA-q2mw-fvj9-vvcw).
#654 adds a configurable max_iterations count for SCRAM-* authentication (GHSA-87pf-fpwv-p7m7).
The default ScramAuthenticator#max_iterations is 2**31 - 1 (max 32-bit signed int), which was already OpenSSL's maximum value. It provides no protection against hostile servers unless it is explicitly set to a lower value by the user.
Breaking Changes
- ⚡
ResponseReadermemoizesConfig#max_response_sizein #642.
Changes to#max_response_sizenow take effect once per response, not on everyIO#read.
NOTE: It is not expected that this will affect any current usage. See the PR for details.
Added
- ✨ Support
BINARYextention to#append(RFC3516) by @nevans in #616 - ✨ Support
LITERAL+andLITERAL-non-synchronizing literals (RFC7888) by @nevans in #649 - 🔒 Add
ScramAuthenticator#max_iterationsby @nevans in #654 - 🏷️ Add
number64andnz-number64to NumValidator by @nevans in #625 - ♻️ Add
MailboxQuota#quota_rootalias by @nevans in #636 - 🔍 Simplify
Net::IMAP#inspectwith basic state by @nevans in #612 - 🥅 Add
ResponseParseError#parser_methods(and override#==) by @nevans in #615
Fixed
- 🔒 Fix STARTTLS stripping vulnerability in #664, reported by @Masamuneee
- Argument validation, reported by @manunio
- ⚡ Much faster ResponseReader performance by @nevans in #642
- 🥅 Successfully parse invalid response code data by @nevans in #614
- Fix JRuby SSL connection failure: use
SSLContext#setupinstead of#freezeby @idahomst in #627 - 🐛 Fix InvalidResponseError in
#get_tagged_responseby @nevans in #633 - Pass an Exception to #raise by @eregon in #643
- 🐛 Fix empty
SearchResult#to_sequence_setin #644, reported by @Quintasan - 🐛 Wait to continue RawData literals by @nevans in #660
Documentation
- 📚 Fix rdoc 7.2 compatibility (section bugfix) by @nevans in #617
- 📚 Switch back to rdoc's darkfish generator (🚧TMP) by @nevans in #618
- 📚 Use
.documentand.rdoc_optionsfiles, where possible by @nevans in #619 - Update README example: Expunge is implicit in MOVE by @sebbASF in #623
- 📚️ Fix QUOTA documentation by @nevans in #636
- 📚 Minor documentation fixes by @nevans in #638
- 📚 Improve documentation of RawData arguments by @nevans in #661
Other Changes
- Handle deep response recursion as ResponseParseError by @Masamuneee in #629
Miscellaneous
- ✅ Fix typo in FakeServer (tests only) by @nevans in #620
- ⬆️ Bump step-security/harden-runner from 2.14.2 to 2.15.0 by @dependabot[bot] in #621
- Bump step-security/harden-runner from 2.15.0 to 2.15.1 by @dependabot[bot] in #626
- ⬆️ Bump step-security/harden-runner from 2.15.1 to 2.16.0 by @dependabot[bot] in #628
- ⬆️ Bump actions/configure-pages from 5 to 6 by @dependabot[bot] in #635
- ✅ Test
#setquotaby @nevans in #636 - ⬆️ Bump actions/deploy-pages from 4 to 5 by @dependabot[bot] in #634
- ⬆️ Bump step-security/harden-runner from 2.16.0 to 2.17.0 by @dependabot[bot] in #639
- Test TruffleRuby release in CI for improved stability by @eregon in #640
- ⬆️ Bump actions/upload-pages-artifact from 4 to 5 by @dependabot[bot] in #646
- ⬆️ Bump step-security/harden-runner from 2.17.0 to 2.19.0 by @dependabot[bot] in #647
New Contributors
- @sebbASF made their first contribution in #623
- @idahomst made their first contribution in #627
- @Masamuneee made their first contribution in #629
- @eregon made their first contribution in #640
Full Changelog: v0.6.3...v0.6.4
v0.5.14
What's Changed
🔒 Security
This release contains fixes for multiple vulnerabilities concerning STARTTLS stripping, argument validation, and denial of service attacks.
Warning
#665 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Important
Argument validation is significantly improved. Several command injection vulnerabilities have been fixed:
#662 fixes CRLF/command/argument injection via Symbol arguments (GHSA-75xq-5h9v-w6px).
#662 fixes CRLF/command/argument injection via the attr argument to #store/#uid_store (GHSA-hm49-wcqc-g2xg)
#662 fixes CRLF/command/argument injection via the storage_limit argument to #setquota (GHSA-hm49-wcqc-g2xg).
#662 fixes CRLF/command injection via RawData (GHSA-hm49-wcqc-g2xg):
#searchand#uid_searchsendcriteriaas raw data, when it is a String#fetchand#uid_fetchsendattras raw data, when it is a String.
Whenattris an Array, its String members are sent as raw data.
Caution
RawData does not defend against other forms of argument injection! It is an intentionally low-level API.
Note
Two denial of service vulnerabilities have been addressed.
These are generally only relevant when connecting to an untrusted hostile server (or without TLS).
#650 fixes quadratic time complexity when reading large responses containing many string literals (GHSA-q2mw-fvj9-vvcw).
#656 adds a configurable max_iterations count for SCRAM-* authentication (GHSA-87pf-fpwv-p7m7).
Added
- 🔒 Add
ScramAuthenticator#max_iterations(backports #654) in #656, reported by @Masamuneee
Fixed
- 🔒 Fix STARTTLS stripping vulnerability (backports #664) in #665, reported by @Masamuneee
- 🔒 Fix CRLF injection vulnerabilities (backports #657, #658, #659, #660, #636, #661) in #662, reported by @manunio
- ⚡ Much faster ResponseReader performance (backports #642) in #650, reported by @Masamuneee
- 🐛 Config
version_defaultsshould be attr_reader (backports #594) by @nevans in #631 - 🐛 Wait to continue RawData literals (backports #660) by @nevans in #662
Other Changes
Miscellaneous
Full Changelog: v0.5.13...v0.5.14
v0.4.24
Important
The 0.4.x release branch will only receive critical security fixes, and will be unsupported when ruby 3.3 is EOL.
Please upgrade to a newer version.
What's Changed
🔒 Security
This release contains fixes for multiple vulnerabilities concerning STARTTLS stripping, argument validation, and denial of service attacks.
Warning
#666 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Important
Argument validation is significantly improved. Several injection vulnerabilities have been fixed:
#663 fixes CRLF/command/argument injection via Symbol arguments (GHSA-75xq-5h9v-w6px).
#663 fixes CRLF/command/argument injection via the attr argument to #store/#uid_store (GHSA-hm49-wcqc-g2xg)
#663 fixes CRLF/command/argument injection via the storage_limit argument to #setquota (GHSA-hm49-wcqc-g2xg).
#663 fixes CRLF/command injection via RawData (GHSA-hm49-wcqc-g2xg):
#searchand#uid_searchsendcriteriaas raw data, when it is a String#fetchand#uid_fetchsendattras raw data, when it is a String.
Whenattris an Array, its String members are sent as raw data.
Caution
RawData does not defend against other forms of argument injection! It is an intentionally low-level API.
Note
Two denial of service vulnerabilities have been addressed.
These are generally only relevant when connecting to an untrusted hostile server (or without TLS).
#651 fixes quadratic time complexity when reading large responses containing many string literals (GHSA-q2mw-fvj9-vvcw).
#655 adds a configurable max_iterations count for SCRAM-* authentication (GHSA-87pf-fpwv-p7m7).
The default ScramAuthenticator#max_iterations is 2**31 - 1 (max 32-bit signed int), which was already OpenSSL's maximum value. It provides no protection against hostile servers unless it is explicitly set to a lower value by the user.
Added
- 🔒 Add
ScramAuthenticator#max_iterations(backports #654) in #655, reported by @Masamuneee
Fixed
- 🔒 Fix STARTTLS stripping vulnerability (backports #664) in #666, reported by @Masamuneee
- 🔒 Fix CRLF injection vulnerabilities (backports #657, #658, #659, #660, #636, #661) in #663, reported by @manunio
- ⚡ Much faster ResponseReader performance (backports #642) in #651, reported by @Masamuneee
- 🐛 Wait to continue RawData literals (backports #660) by @nevans in #663
Other Changes
Full Changelog: v0.4.23...v0.4.24
v0.3.10
Important
0.3.10 is the final release for the 0.3.x release series. Please upgrade to a newer version.
What's Changed
🔒 Security
Warning
#667 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Fixes
- 🔒 Fix STARTTLS stripping vulnerability (backports #664, #395, #198) in #667, reported by @Masamuneee
Full Changelog: v0.3.9...v0.3.10
v0.6.3
What's Changed
Added
- 🥅 Add parser state and
#detailed_messagetoResponseParseErrorby @nevans in #599 - 🔧 Add
Config#overrides?(opposite of#inherited?) by @nevans in #610 - 🔧 Add recursive
Config#inherits_defaults?by @nevans in #611
Fixed
- 🐛 Parse
resp-textwith invalidresp-text-codeby @nevans in #601 - 🐛
Config.version_defaultsshould be read only by @nevans in #594
Other Changes
- 🥅 Only print parser debug for unhandled errors by @nevans in #600
- ♻️ Don't hardcode parser deprecation warning uplevel by @nevans in #602
- ♻️ Simplify
Config::AttrAccessorsa little by @nevans in #606 - ♻️ Set Config[:default] as alias of Config[VERSION] by @nevans in #608
Fixes for unreleased code:
- 🐛 Return ResponseText from
resp-textfallback by @nevans in #605 - 🐛 Fix parse error parser_backtrace (for ruby <= 3.3) by @nevans in #604
Miscellaneous
- Delete test/net/imap/test_data_lite.rb by @nobu in #593
- ⬆️ Bump step-security/harden-runner from 2.14.0 to 2.14.1 by @dependabot[bot] in #596
- Bump step-security/harden-runner from 2.14.1 to 2.14.2 by @dependabot[bot] in #598
Full Changelog: v0.6.2...v0.6.3
v0.6.2
What's Changed
Fixed
- 🐛 Fix
SequenceSet#delete?(num..num)to return set by @nevans in #583 - 🐛 Fix
#responses()freezing internal arrays by @nevans in #587, reported by @yurikoval in #581
Full Changelog: v0.6.1...v0.6.2
v0.6.1
What's Changed
Fixed
Miscellaneous
- ⬆️ Bump step-security/harden-runner from 2.13.3 to 2.14.0 by @dependabot[bot] in #579
Full Changelog: v0.6.0...v0.6.1
v0.5.13
What's Changed
Fixed
- 🐛 Fix
SequenceSet#delete?(num..num)to return set (backport to 0.5) by @nevans in #585 - 🐛 Fix
SequenceSet#max(n)whencardinality < n <= size(backport to 0.5) by @nevans in #586 - 🐛 Fix
config.responses_without_block = :frozen_dup(backport to 0.5) by @nevans in #588, reported by @yurikoval in #581
Documentation
Other Changes
- ♻️ Refactor
Config.versioned_defaultsto reduce merge conflicts (backport to 0.5) by @nevans in #584
Miscellaneous
Full Changelog: v0.5.12...v0.5.13
v0.4.23
v0.6.0
What's Changed
Breaking Changes
- 🔧 Update default config for
v0.6by @nevans in #539responses_without_blockchanged from:warnto:frozen_dupparser_use_deprecated_uidplus_datachanged from:up_to_max_sizetofalse(and is deprecated)parser_max_deprecated_uidplus_data_sizechanged from100to0(and is deprecated)
- 💥 Require ruby >= 3.2 (drop support for 3.1) by @nevans in #538
- 💥✨ Change
SequenceSet#sizeto count*and repeated numbers by @nevans in #564
SequenceSetis used to represent both sorted sets and ordered lists (which may contain duplicates). Members are non-zero UInt32 numbers, but"*"has special meaning as "the number corresponding to the last mailbox entry". So there are four different ways to count the members of aSequenceSet.
Previously,#sizewas an alias for#count. Now it differs in both relevant aspects.*is a unique member*is treated like 2³² - 1distinct set members #cardinality#countordered list, including duplicates #size#count_with_duplicates - 🔥 Remove deprecated UIDPlusData class by @nevans in #540
UIDPlusDatawas deprecated by v0.5.6.AppendUIDDataorCopyUIDDatawill always be returned instead. - 🔥 Delete deprecated
MessageSetby @nevans in #573
MessageSetwas deprecated by v0.5.0. UseSequenceSetinstead. - 🔥 Use psych (>= 5.2.5) for encoding Data objects by @nevans in #543
This changes the YAML tag forDatasubclasses fromruby/object:Net::IMAP::DataSubclasstoruby/data:Net::IMAP::DataSubclass. YAML dumped by earliernet-imapversions may not load correctly. Psych >= 5.2.5 is required to dump these objects correctly. - 💥 Do not include
OpenSSLandOpenSSL::SSLmodules intoNet::IMAPby @nevans in #533
This only affects the ability to use OpenSSL constants from theNet::IMAPnamespace. - 💥 Don't set
verify_callbacktoVerifyCallbackProcby @nevans in #534
This functionality was never documented and is redundant with theverify_callbackoption.
Deprecated
- Deprecated config options for UIDPlusData in #540
Theparser_use_deprecated_uidplus_dataandparser_max_deprecated_uidplus_data_sizeconfig options will be removed in v0.7.0. They are kept for backward compatibility, but they do not affect response parser results. Whenparser_use_deprecated_uidplus_datais changed from the default value (false), deprecation warnings are printed when parsingAPPENDUIDorCOPYUIDresponse codes.
Added
- 🔒 Add
when_capabilities_cachedoption forConfig#sasl_irby @nevans in #561 Net::IMAP::ConfigimprovementsNet::IMAP::SequenceSetimprovements- ✨ Add
SequenceSet#intersect!for in-place setANDby @nevans in #549 - ✨ Add
SequenceSet#xor!for in-place setXORby @nevans in #550 - ♻️ Coalesce entries in
SequenceSet#appendby @nevans in #553 - ✨ Add
SequenceSet#normalized?by @nevans in #558 - ✨ Add
SequenceSet#cardinalitymethod by @nevans in #563 - 💥✨ Change
SequenceSet#sizeto count*and repeated numbers by @nevans in #564
- ✨ Add
Net::IMAP::NumValidatorimprovements
Documentation
- 📚 Improve rdoc example for
#uid_fetchwithpartialby @nevans in #532 - 📚 Document SearchResult/ESearchResult compatibility by @nevans in #559
- 📚 Minor rdoc formatting fixes by @nevans in #560
Other Changes
- 🔥 Drop
Datapolyfill by @nevans in #541
This was only used for ruby 3.1, which is no longer supported. So this is not considered a breaking change. - ♻️ Refactor Config.versioned_defaults to reduce merge conflcts by @nevans in #544
- Improved
Net::IMAP::SequenceSetperformance- ⚡️ Don't memoize
SequenceSet#stringon normalized sets by @nevans in #554 - ⚡ Faster
SequenceSet#normalizewhen frozen by @nevans in #556 - ⚡️ Faster
SequenceSet#full?by @nevans in #565 - ⚡️ Slightly faster
SequenceSet#xorby @nevans in #567 - ⚡ Avoid allocating arrays for SequenceSet bsearch (♻️ extract abstract strategy methods) by @nevans in #569
- ♻️ Rename
SequenceSetinternals by @nevans in #562 - ♻️ Reorganize
SequenceSetinternals by @nevans in #568
- ⚡️ Don't memoize
Miscellaneous
- ✅ Stop using deprecated UIDPlusData in tests by @nevans in #542
- ⬆️ Bump step-security/harden-runner from 2.13.1 to 2.13.2 by @dependabot[bot] in #548
- 🐛 Fix workflow to deploy RDoc to GitHub pages by @nevans in #551
- ⬆️ Bump actions/checkout from 5 to 6 by @dependabot[bot] in #555
- 📦 Update
release.ymlforgithub_actionslabel by @nevans in #557 - ⬆️ Bump step-security/harden-runner from 2.13.2 to 2.13.3 by @dependabot[bot] in #566
- 🔖 Release 0.6 by @nevans in #574
- Workarounds for "Publishing gem fails with digest gem activation failure" issue #576
Full Changelog: v0.5.12...v0.6.0