aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/upas
diff options
context:
space:
mode:
authorCharles Collicutt <charles@collicutt.co.uk>2018-05-17 22:56:12 +0100
committerDavid du Colombier <0intro@gmail.com>2018-10-05 18:15:28 +0200
commitdb27122d3942ebec4471c260403d87cdd6541add (patch)
tree6789e6b5feec061d72f78ea0e9957d3255907542 /src/cmd/upas
parent93c75d2bad341af383520409fd354dcff3f2c279 (diff)
downloadplan9port-db27122d3942ebec4471c260403d87cdd6541add.tar.gz
plan9port-db27122d3942ebec4471c260403d87cdd6541add.tar.bz2
plan9port-db27122d3942ebec4471c260403d87cdd6541add.zip
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 (limited to 'src/cmd/upas')
-rw-r--r--src/cmd/upas/nfs/imap.c2
1 files changed, 1 insertions, 1 deletions
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;