Skip to content

Commit a864e0d

Browse files
committed
📚 Document deprecated config options for UIDPlusData
1 parent 22da434 commit a864e0d

File tree

1 file changed

+25
-32
lines changed

1 file changed

+25
-32
lines changed

lib/net/imap/config.rb

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -347,38 +347,31 @@ def self.[](config)
347347
#
348348
# Alias for responses_without_block
349349

350-
# Whether ResponseParser should use the deprecated UIDPlusData or
350+
# **NOTE:** <em>+UIDPlusData+ has been removed since +v0.6.0+, and this
351+
# config option is completely ignored. The config option is kept
352+
# only for compatibility and will be removed by +v0.7.0+.</em>
353+
#
354+
# Whether ResponseParser would use the deprecated UIDPlusData or
351355
# CopyUIDData for +COPYUID+ response codes, and UIDPlusData or
352356
# AppendUIDData for +APPENDUID+ response codes.
353357
#
354-
# UIDPlusData stores its data in arrays of numbers, which is vulnerable to
355-
# a memory exhaustion denial of service attack from an untrusted or
356-
# compromised server. Set this option to +false+ to completely block this
357-
# vulnerability. Otherwise, parser_max_deprecated_uidplus_data_size
358-
# mitigates this vulnerability.
359-
#
360-
# AppendUIDData and CopyUIDData are _mostly_ backward-compatible with
361-
# UIDPlusData. Most applications should be able to upgrade with little
362-
# or no changes.
363-
#
364-
# <em>(Parser support for +UIDPLUS+ added in +v0.3.2+.)</em>
358+
# Parser support for +UIDPLUS+ added in +v0.3.2+.
365359
#
366-
# <em>(Config option added in +v0.4.19+ and +v0.5.6+.)</em>
360+
# Config option added in +v0.4.19+ and +v0.5.6+.
367361
#
368-
# <em>UIDPlusData will be removed in +v0.6+ and this config setting will
369-
# be ignored.</em>
362+
# <em>UIDPlusData was removed in +v0.6.0+.</em>
370363
#
371-
# ==== Valid options
364+
# ==== Options
372365
#
373366
# [+true+ <em>(original default)</em>]
374-
# ResponseParser only uses UIDPlusData.
367+
# <em>IGNORED since v0.6+.</em>
368+
# Prints a warning when UIDPLUS data is parsed.
375369
#
376370
# [+:up_to_max_size+ <em>(default since +v0.5.6+)</em>]
377-
# ResponseParser uses UIDPlusData when the +uid-set+ size is below
378-
# parser_max_deprecated_uidplus_data_size. Above that size,
379-
# ResponseParser uses AppendUIDData or CopyUIDData.
371+
# <em>IGNORED since v0.6+.</em>
372+
# Prints a warning when UIDPLUS data is parsed.
380373
#
381-
# [+false+ <em>(planned default for +v0.6+)</em>]
374+
# [+false+ <em>(only valid option since +v0.6.0+)</em>]
382375
# ResponseParser _only_ uses AppendUIDData and CopyUIDData.
383376
attr_accessor :parser_use_deprecated_uidplus_data, type: Enum[
384377
true, :up_to_max_size, false
@@ -388,22 +381,22 @@ def self.[](config)
388381
0.6r => false,
389382
}
390383

391-
# The maximum +uid-set+ size that ResponseParser will parse into
392-
# deprecated UIDPlusData. This limit only applies when
393-
# parser_use_deprecated_uidplus_data is not +false+.
384+
# **NOTE:** <em>+UIDPlusData+ has been removed since +v0.6.0+, and this
385+
# config option is ignored. The config option is kept only for
386+
# compatibility and will be removed by +v0.7.0+.</em>
394387
#
395-
# <em>(Parser support for +UIDPLUS+ added in +v0.3.2+.)</em>
388+
# The maximum +uid-set+ size that ResponseParser would parse into
389+
# deprecated UIDPlusData. This limit would only apply when
390+
# parser_use_deprecated_uidplus_data was not +false+.
396391
#
397-
# <em>Support for limiting UIDPlusData to a maximum size was added in
398-
# +v0.3.8+, +v0.4.19+, and +v0.5.6+.</em>
392+
# Parser support for +UIDPLUS+ added in +v0.3.2+.
399393
#
400-
# <em>UIDPlusData will be removed in +v0.6+.</em>
394+
# Support for limiting UIDPlusData to a maximum size was added in
395+
# +v0.3.8+, +v0.4.19+, and +v0.5.6+.
401396
#
402-
# ==== Versioned Defaults
397+
# <em>UIDPlusData was removed in +v0.6.0+.</em>
403398
#
404-
# Because this limit guards against a remote server causing catastrophic
405-
# memory exhaustion, the versioned default (used by #load_defaults) also
406-
# applies to versions without the feature.
399+
# ==== Versioned Defaults
407400
#
408401
# * +0.3+ and prior: <tt>10,000</tt>
409402
# * +0.4+: <tt>1,000</tt>

0 commit comments

Comments
 (0)