Subject: [sieve] ABNF error in ManageSieve

From: Alexey Melnikov <[email-masked]>
Date: Wed, 17 Nov 2010 17:57:02 +0000

I got the following error report on RFC 5804:

>     QUOTED-CHAR           = SAFE-UTF8-CHAR / "\" QUOTED-SPECIALS
>
>     QUOTED-SPECIALS       = DQUOTE / "\"
>
>     SAFE-UTF8-CHAR        = SAFE-CHAR / UTF8-2 / UTF8-3 / UTF8-4
>                             ;; <UTF8-2>, <UTF8-3>, and <UTF8-4>
>                             ;; are defined in [UTF-8].
>
>
>     quoted                = DQUOTE *1024QUOTED-CHAR DQUOTE
>                             ;; limited to 1024 octets between the <">s
>
>
> The comment for quoted is not what the syntax rule for quoted does.  The
> syntax rule allows as many as 4096 octets, as QUOTED-CHAR is 1-4 octets.
>
> I think that the intent is to limit the overall number of octets, and not
> the number of characters.  Otherwise it doesn't make sense at all.

I think the report is correct. The restriction came from ACAP and RFC 
2244 says that a quoted string is limited to 1024 octets.

Comments?

Best Regards,
Alexey

---

From: Barry Leiba <[email-masked]>
Date: Tue, 30 Nov 2010 14:05:46 -0500

> I think the report is correct. The restriction came from ACAP and RFC 2244
> says that a quoted string is limited to 1024 octets.

That's correct.

The way we usually handle this sort of thing is not to put a
restriction in the formal grammar, but to list it in the comments
only.  Like this:

      quoted                = DQUOTE *QUOTED-CHAR DQUOTE
                              ;; limited to 1024 octets between the <">s

That's not ideal, but it's worked before.  Trying to enforce the limit
in the formal grammar will be icky.[1]

Barry

[1] That's a technical term.