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.
This commit is contained in:
Charles Collicutt 2018-05-17 22:56:12 +01:00 committed by David du Colombier
parent 93c75d2bad
commit db27122d39

View file

@ -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;