On 12/24/02 at 12:43 PM -0500, Bruce Lilly wrote:
Pete Resnick wrote:
On 12/24/02 at 9:06 AM -0500, Bruce Lilly wrote:
There most certainly is a phrase, part of the mailbox.
No, sorry, it doesn't work that way. Just because 2368 (via 1738)
specifies that some structured part of an encoded URL follows
822/2822 syntax for "mailbox" does not mean that a mail header
field that contains such a URL therefore contains a mailbox. The
parser for 822/2822/2047 does not know about URL parsing and cannot
get past the "%" encoded bits. There is no intervening 1738 parser.
That depends on the context. In the case of the List-Owner example
and a number of fairly widely-used MUAs, the URL is properly decoded
when using the List-Owner field content to generate a message to the
list owner, and some even decode the 2047 encoding for display.
Absolutely irrelevant. As far as 822/2822/2047 is concerned,
List-Owner does not contain a phrase. It might contain something with
a lot of "%" characters, but the parser is not going to see a phrase
in there. Now, the contents of a List-Owner field can be passed to a
1738/2396 parser and, upon discovering a mailto: URL (as against any
other kind of URL), one might parse the URL according to 2368 and
discover within the scheme-specific part of the URL something that is
a mailbox list. The *result* could then be passed to a 822/2822
parser and *then* to a 2047 parser for display purposes. But that's
*at least* a third pass over the data (and probably a bunch more
depending on how you count). And what that last 2047 parse is seeing
is most emphatically NOT the contents of a List-Owner field. The
"context" (as you put it) does not pass from parser to parser.
Surely you're not suggesting that correct use of the List-Owner etc.
header fields to generate messages to the list owner etc. would be
to use the raw URL %-encoded text in the headers?
No. I'm suggesting that you can't do it in one pass and expect
legitimate results.
It seems that you're implying that a To header generated from a
mailto URL doesn't contain a mailbox even if it matches the mailbox
syntax and although a To header generated from any other mechanism
may contain a mailbox -- that doesn't sound right either.
No, of course the To field generated from a mailto URL contains a
mailbox. It's that a List-Owner field containing a mailto URL doesn't
contain a mailbox.
And as far as I can tell, you can't have anything in a URL in a
header field that a 2047 parser would recognize as a phrase or a
comment.
URLs can contain parentheses
But URLs can't contain "=" or "?", so a 2047 parser is not going to
find anything interesting in the parentheses.
Examples have been given in earlier messages in this thread; a
simplistic matching of header field text using regular expressions
might incorrectly match a "comment" where there is none.
But that wasn't the issue. The question that was being asked was
whether a simplistic regexp "parser" would accidentally find text
which it thought was 2047 syntax. Your claim was that such text could
occur in a field which contained a URL. Since "=" and "?" can't
appear in a URL according to 1738 and 2396, a 2047 parser should
never be tripped up by a URL in a header field.
If you can come up with a serious example of where one might find
something that looked like 2047 text in a field where it shouldn't
find any, I'd be significantly more concerned.
--
Pete Resnick <mailto:presnick(_at_)qualcomm(_dot_)com>
QUALCOMM Incorporated - Direct phone: (858)651-4478, Fax: (858)651-1102