Mailing List Archive

Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec
Hy guys,

i think there is an error in the new yml test (#exp-syntax-error,
#redirect-empty-domain,#redirect-syntax-error ) or the spec. In the test
it say it should fail with permerror because the grammar is
redirect=spec-domain and spec-domain cannot be empty.
But using the full grammar redirect= matches the unknown modifier. The
unknown modifier is allowed to have an empty value, and there is no rule
to say that the unknown modifier cannot start with "redirect=".
So the tests should not return a permerror and just pass.

We used the testsuite:
http://www.openspf.org/source/project/test-suite/rfc4408-tests.yml?rev=77&view=markup


Thx,

Norman



-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
On Wed, 17 Jan 2007, Norman Maurer wrote:

> i think there is an error in the new yml test (#exp-syntax-error,
> #redirect-empty-domain,#redirect-syntax-error ) or the spec. In the test
> it say it should fail with permerror because the grammar is
> redirect=spec-domain and spec-domain cannot be empty.
> But using the full grammar redirect= matches the unknown modifier. The
> unknown modifier is allowed to have an empty value, and there is no rule
> to say that the unknown modifier cannot start with "redirect=".
> So the tests should not return a permerror and just pass.

Well, you have a case for empty exp=, and there is a lively
discussion here about it [see http://www.openspf.org/RFC_4408/Errata#empty-exp]
but the exp and redirect modifiers are included in the grammar.

The grammar for modifier is:

modifier = redirect / explanation / unknown-modifier

So you can only apply the unknown-modifier syntax if it's not
redirect or explanation. Very cut and dried (although you can complain
that it is stupid, and campaign to have it changed for v=spf3). That's why
we have a test suite.

--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
Stuart D. Gathman schrieb:
> On Wed, 17 Jan 2007, Norman Maurer wrote:
>
>
>> i think there is an error in the new yml test (#exp-syntax-error,
>> #redirect-empty-domain,#redirect-syntax-error ) or the spec. In the test
>> it say it should fail with permerror because the grammar is
>> redirect=spec-domain and spec-domain cannot be empty.
>> But using the full grammar redirect= matches the unknown modifier. The
>> unknown modifier is allowed to have an empty value, and there is no rule
>> to say that the unknown modifier cannot start with "redirect=".
>> So the tests should not return a permerror and just pass.
>>
>
> Well, you have a case for empty exp=, and there is a lively
> discussion here about it [see http://www.openspf.org/RFC_4408/Errata#empty-exp]
> but the exp and redirect modifiers are included in the grammar.
>
> The grammar for modifier is:
>
> modifier = redirect / explanation / unknown-modifier
>
> So you can only apply the unknown-modifier syntax if it's not
> redirect or explanation. Very cut and dried (although you can complain
> that it is stupid, and campaign to have it changed for v=spf3). That's why
> we have a test suite.
>
>

I don't agree. The redirect, explanation and unknown-modifier are only
tokens. So its not clear that unknown-modifier can not contain the text
"explaination=". From the spec:

redirect = "redirect" "=" domain-spec


In fact we apply unknown-modifier BECAUSE "redirect=" is not a redirect
modifier by the gramma. So if you guys want to enforce the interpretations
you need to integrate the explanation in the spec.

BTW, it is not about stupidity.. a grammar can be run in a computer...
and that grammar does not do what they say. But i agree with you that
its stupid what we aspect, but thats we just follow strictly the spec.

bye
Norman





-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Bug in #exp-syntax-error, #redirect-empty-domain, #redirect-syntax-error tests or the spec [ In reply to ]
I'll say here the same thing I said one SPF discuss:

The exp modifier provides explanatory information to amplify the rationale
for the result. It should never change the result. A bad exp producing a
permerror is madness.

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
On Wed, 17 Jan 2007, Norman Maurer wrote:

> > modifier = redirect / explanation / unknown-modifier
> >
> > So you can only apply the unknown-modifier syntax if it's not
> > redirect or explanation. Very cut and dried (although you can complain
> > that it is stupid, and campaign to have it changed for v=spf3). That's why
> > we have a test suite.
> >
> >
>
> I don't agree. The redirect, explanation and unknown-modifier are only
> tokens. So its not clear that unknown-modifier can not contain the text
> "explaination=". From the spec:
>
> redirect = "redirect" "=" domain-spec
>
>
> In fact we apply unknown-modifier BECAUSE "redirect=" is not a redirect
> modifier by the gramma. So if you guys want to enforce the interpretations
> you need to integrate the explanation in the spec.

You are still absolutely correct - the ABNF grammar does say that any malformed
exp or redirect modifiers become unknown-modifier - and therefore ignored.

The whole malformed modifier issue is in the errata list. I should
probably allow for ignoring malformed exp and redirect, at least until
there is an official resolution.

However, there seems to be a growing consensus that the correct resolution
is to add a comment to the unknown-modifier grammar:

unknown-modifier = name "=" macro-string ; where name is not any known modifier

to prevent the unknown-modifier clause from being too "greedy".

The main argument is over 'exp='. Julian wants that to be a permerror
also, despite explicit text to the contrary in 6.2/4.

--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stuart D. Gathman wrote:
> The main argument is over 'exp='. Julian wants that to be a permerror
> also, despite explicit text to the contrary in 6.2/4.

Well, I'd say permit both "PermError" and "Fail" for the "exp-empty-domain"
test case until we have turned this into an agreed-upon and approved RFC
4408 erratum.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFruArwL7PKlBZWjsRAsSyAJ9k08Kl9do594WAJibuQoLH/XoryACggM+N
5ddVsTrN+N4HwwxHNNxfqgI=
=07CS
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
On Thu, 18 Jan 2007, Julian Mehnle wrote:

> Stuart D. Gathman wrote:
> > The main argument is over 'exp='. Julian wants that to be a permerror
> > also, despite explicit text to the contrary in 6.2/4.
>
> Well, I'd say permit both "PermError" and "Fail" for the "exp-empty-domain"
> test case until we have turned this into an agreed-upon and approved RFC
> 4408 erratum.

That's what the current version does. It also requires permerror for
"a:", "exists", and other exp, redirect syntax errors.

However, Norman says that all modifier syntax errors should be ignored because
that is what the current ABNF says (syntax errors cause them to match
unknown-modifier instead). He seems to be alone in that so far (like Julian
and exp= ).

--
Stuart D. Gathman <stuart@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
Norman Maurer wrote:

> The unknown modifier is allowed to have an empty value

Yes, but you cannot claim that you don't know exp= because
it's a part of the core spec. Ditto redirect=. But it's
an interesting objection for any other modifier with its
(wannabe) own syntax.

Frank


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
Frank Ellermann schrieb:
> Norman Maurer wrote:
>
>
>> The unknown modifier is allowed to have an empty value
>>
>
> Yes, but you cannot claim that you don't know exp= because
> it's a part of the core spec. Ditto redirect=. But it's
> an interesting objection for any other modifier with its
> (wannabe) own syntax.
>
> Frank
>
>
>

Sure i know exp= etc. But the point is that's not clear in ATLNR. So a
"computer" will not know howto interpret this correct.


bye
Norman


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: Bug in #exp-syntax-error, #redirect-empty-domain,#redirect-syntax-error tests or the spec [ In reply to ]
Norman Maurer wrote:

> Sure i know exp= etc. But the point is that's not clear in ATLNR.
> So a "computer" will not know howto interpret this correct.

What's "ATLNR" ? SPF implementations are supposed to know what a
<domain-spec> is in RFC 4408 for a:, mx:, ptr:, include:, exists:,
exp=, and redirect= alike.

The difference is the potential <unknown-modifier> match. That
is in essence the same issue for <optional-field> in RFC 2882 3.6.

RFC 2822 3.6.8 avoids the ambiguity by a MUST NOT in prose:

| The field names of any optional-field MUST NOT be identical to
| any field name specified elsewhere in this standard.

Is it important enough for another RFC 4408 erratum, stating that
an <unknown-modifier> MUST NOT have a <name> "exp" or "redirect" ?

Frank


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007