plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit db27122d3942ebec4471c260403d87cdd6541add
parent 93c75d2bad341af383520409fd354dcff3f2c279
Author: Charles Collicutt <charles@collicutt.co.uk>
Date:   Thu, 17 May 2018 22:56:12 +0100

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.

Diffstat:
Msrc/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 @@ -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;