Skip to content

Commit be32e71

Browse files
committed
📚 Improve documentation of RawData arguments
Now that fixes for `setquota` (#659), `store`/`uid_store` (#658) have been merged, there should only be two parameters that still use `RawData`: search `criteria` and fetch `attr` (and the `UID` variants). `#search` criteria (when a string) had already been documented, but this aspect of `#fetch` attr was _not_ previously documented!
1 parent 47c7218 commit be32e71

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

lib/net/imap.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,11 +2345,11 @@ def uid_expunge(uid_set)
23452345
# Encoded as an \IMAP date (see ::encode_date).
23462346
#
23472347
# [When +criteria+ is a String]
2348-
# +criteria+ will be sent directly to the server <em>without any
2349-
# validation or encoding</em>.
2348+
# +criteria+ will be sent to the server <em>with minimal validation and no
2349+
# encoding or formatting</em>.
23502350
#
2351-
# <em>*WARNING:* This is vulnerable to injection attacks when external
2352-
# inputs are used.</em>
2351+
# <em>*WARNING:* Although CRLF is prohibited, this is vulnerable to other
2352+
# types of attribute injection attack if unvetted user input is used.</em>
23532353
#
23542354
# ==== Supported return options
23552355
#
@@ -2670,6 +2670,13 @@ def uid_search(...)
26702670
#
26712671
# +attr+ is a list of attributes to fetch; see FetchStruct documentation for
26722672
# a list of supported attributes.
2673+
# >>>
2674+
# When +attr+ is a String, it will be sent <em>with minimal validation and
2675+
# no encoding or formatting</em>. When +attr+ is an Array, each String in
2676+
# +attr+ will be sent this way.
2677+
#
2678+
# <em>*WARNING:* Although CRLF is prohibited, this is vulnerable to other
2679+
# types of attribute injection attack if unvetted user input is used.</em>
26732680
#
26742681
# +changedsince+ is an optional integer mod-sequence. It limits results to
26752682
# messages with a mod-sequence greater than +changedsince+.

0 commit comments

Comments
 (0)