Git Product home page Git Product logo

Comments (4)

sdgathman avatar sdgathman commented on June 17, 2024

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.

sdgathman avatar sdgathman commented on June 17, 2024

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.

sdgathman avatar sdgathman commented on June 17, 2024

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.

sdgathman avatar sdgathman commented on June 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.