Yadis Discover iterates through services #8

Open
ziima opened this Issue Aug 30, 2010 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

ziima commented Aug 30, 2010

When OpenID requests are created for provider which has several OpenID versions in its XRDS document, the most prior one is not used but instead they are iterated. I believe problem is at line 109 in yadis/manager.py which returns manager.next() instead manager.current()

I am not sure about consequences in YADIS protocol, maybe it is bug in yadis library as well.

keturn commented Aug 31, 2010

Does your XRDS have one Service with multiple Types, or multiple Service elements? If you have multiple Service elements, this may be intentional behavior. Please provide a test case.

Contributor

ziima commented Oct 25, 2010

I have following XRDS:

<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns:openid="http://openid.net/xmlns/1.0" xmlns="xri://$xrd*($v*2.0)">
  <XRD>
    <Service priority="10">
      <Type>http://openid.net/server/1.1</Type>
      <Type>http://specs.openid.net/extensions/pape/1.0</Type>
      <URI>https://test.provider/endpoint/</URI>
    </Service>
    <Service priority="0">
      <Type>http://specs.openid.net/auth/2.0/server</Type>
      <Type>http://specs.openid.net/extensions/pape/1.0</Type>
      <URI>https://test.provider/endpoint/</URI>
    </Service>
  </XRD>
</xrds:XRDS>

In specification of YADIS and XRD I found no notes about this. It says that element with highest priority should be used. But when I generate two requests at consumer they will have different service thus ignoring priorities.

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