aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFiles
* libinterimap: factor out hostname/IP parsing.Guilhem Moulin2020-12-111
| | | | | Also, document that enclosing 'host' value in square brackets forces its interpretation as an IP literal (hence skips name resolution).
* libinterimap: show the matching pinned SPKI in --debug mode.Guilhem Moulin2020-12-111
|
* libinterimap: SSL_fingerprint now supports a space-separate list of digests ↵Guilhem Moulin2020-12-091
| | | | | | | | | to pin. And succeeds if, and only if, the peer certificate SPKI matches one of the pinned digest values. Specifying multiple digest values can key useful in key rollover scenarios and/or when the server supports certificates of different types (for instance RSA+ECDSA).
* libinterimap: 'debug' forces 'null-stderr' = 0.Guilhem Moulin2020-12-081
| | | | | | The standard error is never sent to /dev/null in debug mode. Closes: deb#968392
* Upgrade URLs to secure HTTP.Guilhem Moulin2020-08-041
|
* libinterimap: abort on PREAUTH greeting received on plaintext connectionsGuilhem Moulin2020-08-031
| | | | | Set "STARTTLS = NO" to ignore. This is similar to CVE-2020-12398 and CVE-2020-14093.
* libinterimap: Fix response injection vulnerability after STARTTLS.Guilhem Moulin2020-08-031
| | | | For background see https://gitlab.com/muttmua/mutt/-/issues/248 .
* typofixGuilhem Moulin2020-08-031
|
* libinterimap: fail when a capability to ENABLE is missing from the server's ↵Guilhem Moulin2020-08-031
| | | | CAPABILITY listing.
* Improve “UIDVALIDITY changed!” error message.Guilhem Moulin2019-11-151
| | | | | Mention the name of the problematic mailbox. (We may detect the violation while not in SELECTED state.)
* Fix minor space damage.Guilhem Moulin2019-11-131
|
* Avoid sending large UID EXPUNGE|FETCH|STORE and APPEND commands.Guilhem Moulin2019-11-131
| | | | | | | | | | | | | | | | | | | | | | UID EXPUNGE|FETCH|STORE commands are now split into multiple (sequential) commands when their set representation exceeds 4096 bytes in size. Without splitting logic set representations could grow arbitrarily large, and exceed the server's maximum command size. This adds roundtrips which could be eliminated by pipelining, but it's unlikely to make any difference in typical synchronization work. While set representations seem to remain small in practice, they might grow significantly if many non-contiguous UIDs were flagged and/or expunged, and later synchronized at once. Furthermore, for MULTIAPPEND-capable servers, the number of messages is limited to 128 per APPEND command (also subject to a combined literal size of 1MiB like before). These numbers are currently not configurable. They're intentionally lower than Dovecot's default maximum command size (64k) in order to avoid a deadlock situation after sending 8k-long commands under COMPRESS=DEFLATE: https://dovecot.org/pipermail/dovecot/2019-November/117522.html .
* Net::IMAP::InterIMAP: Don't export $IMAP_text and $IMAP_cond.Guilhem Moulin2019-11-131
|
* Net::IMAP::InterIMAP::push_flag_updates() bugfixes.Guilhem Moulin2019-11-131
| | | | | | | | | | | | | | The UNCHANGEDSINCE test from the CONDSTORE extension was incorrectly placed after the flag list in UID STORE commands. In practice this meant the server didn't add the MODIFIED code when needed. The server won't send an untagged FETCH command (and won't increase the message's MODSEQ) if no change was made to the flag list. A panic() was incorrectly triggered in that case. When the flag list was set (by another client) to a superset of the UID STORE command currently processed, the extra flags were not synchronized. Cf. RFC 7162 sec. 3.1.3 ex. 10.
* Bump minimum Perl for Net::IMAP::InterIMAP to v5.20.Guilhem Moulin2019-11-131
| | | | | We're using s///r which was introduced in 5.14, and hash slices which were introduced in 5.20.
* Test suite: add new tests for SSL/TLS.Guilhem Moulin2019-11-131
| | | | | SSL connections are accepted on TCP port 10993. Also, fix STARTTLS directive, broken since fba1c36…
* Remove deprecated/buggy 'o' regexp modifier.Guilhem Moulin2019-11-081
|
* libinterimap: honor compress={Yes/No}.Guilhem Moulin2019-11-081
|
* Refactor logging logic.Guilhem Moulin2019-11-071
| | | | | | | Also, introduce new option 'logger-prefix' to determine the prefix of each log line. Closes: #942725.
* libinterimap: Don't panic at the end of the compressed stream.Guilhem Moulin2019-11-071
| | | | | Cf. Compress::Raw::Zlib's documentation. Z_STREAM_END denotes a successful state.
* libinterimap: Free reference to $self in _start_ssl().Guilhem Moulin2019-11-071
| | | | | | | | (We don't need the function anymore once the handshake is established). Otherwise the reference count of that IMAP client never gets to 0 before the global destruction phase. For interimap, this causes traffic stats to be printed not by the cleanup() function as intended, but just before the program exits.
* wibbleGuilhem Moulin2019-11-071
|
* Update copyright years.Guilhem Moulin2019-11-061
|
* Allow lowercase SASL mechanisms.Guilhem Moulin2019-11-061
| | | | | | RFC 2222 sec. 3 says that values are “from 1 to 20 characters in length, consisting of upper-case letters, digits, hyphens, and/or underscores” so we always upper-case the value.
* pullimap, interimap: redact AUTHENTICATE and LOGIN commandsGuilhem Moulin2019-11-061
| | | | | | In --debug mode in order to avoid inadvertently receiving credentials in bug reports. --debug can be set twice to spell out these commands in full.
* libinterimap: use directories relative to $HOME for the XDG defaults.Guilhem Moulin2019-07-081
| | | | | | | | | | | | Previously getpwuid() was called to determine the user's home directory, while the XDG specification explicitely mentions $HOME. Conveniently our docs always mentioned ~/, which on POSIX-compliant systems expands to the value of the variable HOME (and the result is unspecified when the variable is unset). Cf. Shell and Utilities volume of POSIX.1-2017, sec. 2.6.1: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_01
* typo fixesGuilhem Moulin2019-05-281
|
* Net::IMAP::InterIMAP: call shutdown(2) on teardown also for type=tunnel.Guilhem Moulin2019-05-281
| | | | | | Since we now use socketpair(2) for type=tunnel (instead of a pair of unnamed pipes) we can unify communication endpoints creation and teardown.
* libinterimap: use socketpair(2) in tunnel mode.Guilhem Moulin2019-05-271
| | | | | | Rather than two pipe(2). Also, use SOCK_CLOEXEC to save a fcntl() call when setting the close-on-exec flag on the socket (even though Perl will likely call fcntl() anyway).
* libinterimap: astring is 1*ASTRING-CHAR / string.Guilhem Moulin2019-05-271
| | | | | | | | | | | | | | | Not 1*ATOM-CHAR / string. Also accept LIST responses mailbox names containing '%', '*', or ']'. From RFC 3501: astring = 1*ASTRING-CHAR / string ASTRING-CHAR = ATOM-CHAR / resp-specials list = "LIST" SP mailbox SP list-mailbox list-mailbox = 1*list-char / string list-char = ATOM-CHAR / list-wildcards / resp-specials list-wildcards = "%" / "*" resp-specials = "]"
* libinterimap: quote() the empty string as "" instead of a 0-length literal.Guilhem Moulin2019-05-271
| | | | | Compression asside, this saves 3 bytes and one round-trip on servers not supporting non-synchronizing literals, and 4 bytes otherwise.
* libinterimap: bugfix: fix escaped hierarchy delimiters in LIST reponses.Guilhem Moulin2019-05-271
| | | | | The were returned as escaped quoted specials, like "\\", not as a single character (backslash in this case).
* Bump copyright years.Guilhem Moulin2019-01-221
|
* Bump version number.Guilhem Moulin2019-01-221
|
* Net::IMAP::InterIMAP: add support for TLSv1.3 (on recent enough Net::SSLeay).Guilhem Moulin2019-01-221
| | | | | | | Also, change "SSL_protocols" default value from "!SSLv2 !SSLv3" to "!SSLv2 !SSLv3 !TLSv1 !TLSv1.1". I.e., only enable TLSv1.2 and later, which is the default in Debian's OpenSSL as of 1.1.1-2, cf. https://tracker.debian.org/news/998835/accepted-openssl-111-2-source-into-unstable/ .
* Specify minimum Perl and Net::SSLeay versions.Guilhem Moulin2019-01-201
|
* pullimap, interimap: Use $XDG_CONFIG_HOME/$NAME/config as config file.Guilhem Moulin2019-01-201
|
* Improve ESEARCH response parsing for full RFC 4466 compatibility.Guilhem Moulin2018-05-101
|
* typofixGuilhem Moulin2018-05-091
|
* Fix uninitialized value $set in quotemetaGuilhem Moulin2018-05-091
|
* Add support for untagged ESEARCH responses from RFC 4731.Guilhem Moulin2018-05-091
|
* Library: new API idle_start() and idle_stop().Guilhem Moulin2018-05-091
|
* Ensure the lower bound of UID ranges is at least 1.Guilhem Moulin2017-05-291
|
* "fingerprint" now only pins the cert's SPKI, not the cert itself.Guilhem Moulin2016-12-011
|
* Net::IMAP::InterIMAP, interimap: Add support for IMAP NOTIFY [RFC 5465].Guilhem Moulin2016-03-121
| | | | | Unsollicited LIST responses are currently ignored, hence interimap won't detect mailbox creation/deletion/subcription/unsubscription.
* Net::IMAP::InterIMAP: quit idling when a time jump of at least 30s is detectedGuilhem Moulin2016-03-121
| | | | | This forces a write, so we can better detect detect dead peers after hibernation for instance.
* Net::IMAP::InterIMAP: set SO_{RCV,SND}TIMEO on the socket so we can detect ↵Guilhem Moulin2016-03-121
| | | | dead peers
* Net::IMAP::InterIMAP: set binmode on the socket (and our pipe ends)Guilhem Moulin2016-03-121
|
* Net::IMAP::InterIMAP optimisation: ignore a new message that's immediately ↵Guilhem Moulin2016-03-121
| | | | | | expunged (before we had a chance to sync it)
* Net::IMAP::InterIMAP: Don't increase UIDNEXT when receiving EXISTS responses.Guilhem Moulin2016-03-121
| | | | | | | | | | | Indeed, if the server sends * n EXISTS * n EXPUNGE meaning a new message is received, and is immediately removed afterwards, the server might have allocated a new UID for the removed message.