From db27122d3942ebec4471c260403d87cdd6541add Mon Sep 17 00:00:00 2001 From: Charles Collicutt Date: Thu, 17 May 2018 22:56:12 +0100 Subject: upas/nfs: correctly quote IMAP LOGIN arguments According to RFC 3501 the arguments to the LOGIN command should be quoted strings (or length prefixed string literals). Without quoting, authentication to some IMAP servers (e.g. Dovecot) will fail. --- src/cmd/upas/nfs/imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/upas/nfs/imap.c b/src/cmd/upas/nfs/imap.c index 2cbe99e1..8d43fe79 100644 --- a/src/cmd/upas/nfs/imap.c +++ b/src/cmd/upas/nfs/imap.c @@ -214,7 +214,7 @@ imaplogin(Imap *z) return -1; } - sx = imapcmdsx(z, nil, "LOGIN %Z %Z", up->user, up->passwd); + sx = imapcmdsx(z, nil, "LOGIN %#Z %#Z", up->user, up->passwd); freeup(up); if(sx == nil) return -1; -- cgit v1.2.3