Displaying 4 results from an estimated 4 matches for "rfc822_parse_quoted_string".
2017 Nov 01
2
Bug: lmtp proxy does not quote local parts with spaces
...he username, leading to escaped
characters left in escaped form, and is not treating it consistently, choosing
to either strip the surrounding quotes or not depending on whether or not it
contains an @. I've fixed this by changing the code in lmtp_unescape_address()
[src/lmtp/commands.c] to use rfc822_parse_quoted_string().
2. This leads to the second problem where the username becomes ambiguous if the
local-part contains an @ (regardless of whether or not the first fix is applied
or not). I've worked around this by using strrchr() instead of strchr() on the
username string to split the domain out in mail_user...
2017 Oct 26
2
Bug: lmtp proxy does not quote local parts with spaces
On 26/10/2017 18:38, Alexander Dalloz wrote:
> Am 26.10.2017 um 12:20 schrieb David Zambonini:
>>
>> There seems to be a bug with RFC822 processing in ltmp proxying that
>> doesn't
>> quote local parts that, for example, contain spaces.
>
> Newer related RFCs are RFC 5321 and 5322.
Typo, meant to say RFC2822, which they still supercede, not that the
2017 Nov 03
0
Bug: lmtp proxy does not quote local parts with spaces
...to escaped
> characters left in escaped form, and is not treating it consistently, choosing
> to either strip the surrounding quotes or not depending on whether or not it
> contains an @. I've fixed this by changing the code in lmtp_unescape_address()
> [src/lmtp/commands.c] to use rfc822_parse_quoted_string().
>
> 2. This leads to the second problem where the username becomes ambiguous if the
> local-part contains an @ (regardless of whether or not the first fix is applied
> or not). I've worked around this by using strrchr() instead of strchr() on the
> username string to split the...
2017 Nov 03
1
Bug: lmtp proxy does not quote local parts with spaces
...') {
- /* error */
- return name;
- }
- p++;
- }
- if (*p == '@')
- return name;
- str_append_c(str, *p);
- }
- p++;
- if (*p != '@' && *p != '\0')
- return name;
+ rfc822_parser_init(&parser, (const unsigned char*)name, strlen(name), NULL);
+ rfc822_parse_quoted_string(&parser, str);
- str_append(str, p);
+ str_append(str, (const char*)parser.data);
return str_c(str);
}
--- dovecot-2.2.33.2/src/lmtp/lmtp-proxy.c 2017-10-05 18:10:44.000000000 +0100
+++ dovecot-2.2.33.2.quoted-local-proxy/src/lmtp/lmtp-proxy.c 2017-11-02 13:49:41.154866755 +0000
@@ -8,6...