commit db27122d3942ebec4471c260403d87cdd6541add from: Charles Collicutt via: David du Colombier <0intro@gmail.com> date: Fri Oct 05 16:15:28 2018 UTC 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. commit - 93c75d2bad341af383520409fd354dcff3f2c279 commit + db27122d3942ebec4471c260403d87cdd6541add blob - 2cbe99e1ff605171204c50e5211d9ac370ff5e74 blob + 8d43fe799f0bc766ba2b944cf7d554ddcaf427d5 --- src/cmd/upas/nfs/imap.c +++ 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;