python-openid icon indicating copy to clipboard operation
python-openid copied to clipboard

Yadis Discover iterates through services

Open ziima opened this issue 14 years ago • 2 comments

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.

ziima avatar Aug 30 '10 12:08 ziima

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.

keturn avatar Aug 31 '10 23:08 keturn

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.

ziima avatar Oct 25 '10 08:10 ziima

This repo is being archived. Closing issue.

timcappalli avatar Jul 24 '23 17:07 timcappalli