[
https://issues.apache.org/jira/browse/JSPF-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714386#action_12714386
]
Stefano Bagnara commented on JSPF-72:
-------------------------------------
The problematic code is in
resolver/src/main/java/org/apache/james/jspf/policies/SPFRetriever.java
--------------------
131 : // TODO is this correct? we remove the first and last
char if the
132 : // result has an initial "
133 : // remove '"'
134 : if (compare.charAt(0)=='"') {
135 : compare = compare.toLowerCase().substring(1,
136 : compare.length() - 1);
137 : }
-----------------------
That code is missing escaping handling and multiple quoted string concatenation.
> Parsing errors for TXT records
> ------------------------------
>
> Key: JSPF-72
> URL: https://issues.apache.org/jira/browse/JSPF-72
> Project: JAMES jSPF
> Issue Type: Bug
> Components: Parser
> Affects Versions: 0.9.6, 0.9.7
> Reporter: Robert Burrell Donkin
> Fix For: 0.9.7
>
>
> We are getting parsing errors from jSPF for TXT records like:
> $ host -t txt about.com
> ;; Truncated, retrying in TCP mode.
> about.com descriptive text "v=spf1 ip4:207.241.148.60 ip4:207.241.148.40
> ip4:207.241.148.227 ip4:207.241.145.5 ip4:207.241.145.6
> ip4:207.241.149.197 ip4:207.241.148.39 ip4:207.241.148.226
> ip4:207.241.148.227 ip4:207.241.148.64 ip4:207.241.148.228" "
> a:mclist.about.com a:ablist.about.com a:smtp.about.com a:mxc1s.about.com
> a:smtpapps.about.com a:listserv1.about.com a:listserv2.about.com
> a:mail.about.com a:om1.about.com -all"
> The error jSPF reports when checking messages with that domain is:
> Term [ip4:207.241.148.228"] is not syntactically valid: ...<monster
> regex follows>
> ...the SPF TXT record is valid, to my knowledge. So it seems like a
> parsing error that can't handle TXT records with multiple quoted terms
> on the line?
> It has been suggested that there may be firewall issues since the DNS
> falls back to TCP. I don't think that's happening, but either way... a
> bug, no?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]