commit 42cfa1adbad64b71c846a12d8e26957769c6ced0
Author: Oswald Buddenhagen <[email protected]>
Date: Thu Aug 27 19:37:47 2026 +0200
limit length of credentials supplied to LOGIN
xvprintf_core() uses its internal fixed-size buffer when quoting
strings, so we should limit what we feed it.
this prevents that a build without SASL support oob()s when fed
credentials meant for XOAUTH2.
REFMAIL: [email protected]
src/drv_imap.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 9b170ab..61a79d5 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -2682,6 +2682,11 @@ imap_open_store_authenticate2( imap_store_t *ctx )
if (auth_login) {
if (!ensure_user( srvc ) || !ensure_password( srvc ))
goto bail;
+ // Strictly speaking, the limit is util.c:QPRINTF_BUFF / 2
+ if (strlen( srvc->user ) + strlen( srvc->pass ) > 200) {
+ error( "IMAP error: LOGIN credentials are excessively
long. Wrong AuthMech selected?\n" );
+ goto bail;
+ }
#ifdef HAVE_LIBSSL
if (!ctx->conn.ssl && !ctx->conn.conf->tunnel)
#endif
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel