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

only xrds returned from provider on client validate check #62

Open
GoogleCodeExporter opened this issue Jul 6, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

looking at the typical harness for openid/yadis like the example here:
http://blog.paulisageek.com/2009/06/easy-openid-delegation-with-yadis.html

when using lightopenid you MUST add a secondary check to 
if (strpos($_SERVER['HTTP_ACCEPT'], "application/xrds+xml") !== FALSE) {
when using the current implementation of 
https://gitorious.org/lightopenid/lightopenid/blobs/master/openid.php

i.e. 
if (strpos($_SERVER['HTTP_ACCEPT'], "application/xrds+xml") !== FALSE && 
!isset($_REQUEST['openid_mode']) {

the method "request_curl" adds 'Accept: application/xrds+xml, */*' regardless 
of the request method while "request_streams" DOES NOT add the header when the 
method is POST

"request_curl" should be corrected to
if($method != 'POST'){
  curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/xrds+xml, */*'));
}


Original issue reported on code.google.com by [email protected] on 16 Aug 2012 at 8:15

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

No branches or pull requests

1 participant