Comments (4)
That at least needs a test case for now. But how will the test suite framework check how many lookups were done? I think the framework needs to provide that information to the tests. For now, checking for a different Permerror explanation might be sufficient.
from pyspf.
RFC 7208 says:
Note: This document and its predecessors make no provisions for
defining correct handling of a syntactically invalid <domain-spec>
(which might be the result of macro expansion), per [RFC1035].
So the result will be undefined, like the invalid-domain-long test case.
The goal seems to be to prevent useless DNS lookups.
from pyspf.
RFC 7208 7.1/2 says:
domain-spec = macro-string domain-end
domain-end = ( "." toplabel [ "." ] ) / macro-expand
macro-string = *( macro-expand / macro-literal )
macro-expand = ( "%{" macro-letter transformers *delimiter "}" )
/ "%%" / "%_" / "%-"
macro-literal = %x21-24 / %x26-7E
; visible characters except "%"
We even have a test case with '/' in the domain-spec. So, I'm afraid the '|' is valid per SPF syntax. BUT, since invalid hostname per RFC 1035 is undefined, maybe we could avoid the lookup without breaking anything. This issue is on hold while RFC lawyers weigh in.
from pyspf.
@kitterma Since the result is undefined, current behavior is correct. If you have a reliable and efficient test for a valid domain-spec per RFC 1035 that we could do after macro expansion, then if might be a win to avoid the DNS lookup. Since the result is undefined per RFC 7208 - we can make the result of an invalid domain-spec PermErr since we think the policy owner needs to fix their policy.
from pyspf.
Related Issues (20)
- NameError: name "strict" is not defined HOT 5
- Add special case for +all SPF ? HOT 17
- RST vs MD HOT 5
- http://openspf.net -> http://www.open-spf.org/ HOT 6
- dnspython and CNAME answers HOT 7
- Provide detailed explanation for SPF result, for "Received-SPF" header HOT 2
- Getting list of ip networks fails if prefix is 32 or more HOT 13
- Version number/branches for python3/ipaddress only releases HOT 2
- Using dnspython breaks relative lookups with search path HOT 1
- split() requires a non-empty pattern match HOT 17
- Allow custom DNS server HOT 4
- dnspython vs python3 dns dns.resolver.resolve lifetime arg bug HOT 1
- SPF with redirect problem HOT 1
- Passing lowercase qtype to DNSLookup_dnspython() always results in empty list HOT 3
- vaidating an spf record HOT 2
- Example app illustrating legit use of +all
- Detect a non-trivial subset of AlwaysPass policies HOT 1
- PEP8 coding style HOT 2
- IndexError caused by malformed DNS packet
- Problems with ipv6 queries and void lookups HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyspf.