Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login with no service extensions serialize to invalid XML EPP document #94

Open
kmkaplan opened this issue Mar 27, 2023 · 0 comments
Open

Comments

@kmkaplan
Copy link

kmkaplan commented Mar 27, 2023

When the ext_uris argument to Login::new() is None, Login serializes to and XML document that is invalid against the EPP schema. That's because it outputs an empty <svcExtension/> element, whereas the schema is:

<complexType name="loginSvcType">
  <sequence>
    <element name="objURI" type="anyURI"
     maxOccurs="unbounded"/>
    <element name="svcExtension" type="epp:extURIType"
     minOccurs="0"/>
  </sequence>
</complexType>
<complexType name="extURIType">
  <sequence>
    <element name="extURI" type="anyURI"
     maxOccurs="unbounded"/>
  </sequence>
</complexType>

That means that the <svcExtension> element must contain at least one <extURI> element, it can not be empty. To indicate no service extension the <svcExtension> element should be omited.

Example of generated bogus XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <login>
      <clID>username</clID>
      <pw>password</pw>
      <options>
        <version>1.0</version>
        <lang>en</lang>
      </options>
      <svcs>
        <objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
        <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
        <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
        <svcExtension/>
      </svcs>
    </login>
    <clTRID>cltrid:1626454866</clTRID>
  </command>
</epp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant