authres: parse() function can't get correct quoted-string value
anhdowastaken opened this issue · 3 comments
anhdowastaken commented
Arcoding to https://tools.ietf.org/html/rfc8601:
reasonspec = "reason" [CFWS] "=" [CFWS] value
; a free-form comment on the reason the given result
; was returned
The "value" is as defined in Section 5.1 of [MIME], with
"quoted-string" updated as specified in [RFC6532].
For example:
var parseTests = []msgauthTest{
...
{
value: "example.com;" +
"dkim=pass reason=\"good signature\" header.i=@mail-router.example.net;",
identifier: "example.com",
results: []Result{
&DKIMResult{Value: ResultPass, Reason: "good signature", Identifier: "@mail-router.example.net"},
},
},
}
Instead of good signature
, value of Reason is "good
.
emersion commented
Ah. This means the whole parsing logic will need to be reworked, since quoted-strings can contain ;
.
Line 225 in fb07ec9
anhdowastaken commented
emersion commented
Well, this one too indeed.