Skip to content

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

Description

@kmkaplan

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions