tupas/nfs: correctly quote IMAP LOGIN arguments - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit db27122d3942ebec4471c260403d87cdd6541add
(DIR) parent 93c75d2bad341af383520409fd354dcff3f2c279
(HTM) 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:
M src/cmd/upas/nfs/imap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/src/cmd/upas/nfs/imap.c b/src/cmd/upas/nfs/imap.c
t@@ -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;