CsgoNumber / lightopenid

Automatically exported from code.google.com/p/lightopenid
0 stars 0 forks source link

x-xrds-location header ignored (No server found for AOL) #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

the x-xrds-location header is ignored because of an upper case letter in the 
key name. $this->request($url, 'HEAD') converts all header names to lower case.

The following patch will redirect to the AOL login screen instead of failing 
with "No server found". I don't have an AOL account, so i cannot test the 
validation part.

--- lightopenid.php     26 Sep 2010 21:14:23 -0000      1.4
+++ lightopenid.php     27 Sep 2010 00:16:20 -0000
@@ -227,8 +227,8 @@
                 $headers = $this->request($url, 'HEAD');

                 $next = false;
-                    if (isset($headers['x-xrds-Location'])) {
-                        $url = $this->build_url(parse_url($url), 
parse_url(trim($headers['x-xrds-Location'])));
+                if (isset($headers['x-xrds-location'])) {
+                        $url = $this->build_url(parse_url($url), 
parse_url(trim($headers['x-xrds-location'])));
                         $next = true;
                     }

Original issue reported on code.google.com by HendrikU...@nexgo.de on 27 Sep 2010 at 12:17

GoogleCodeExporter commented 8 years ago
Of course, you're right. I didn't notice it while changing the case of headers.

Thanks for the report and continued testing.

Original comment by mewp...@gmail.com on 27 Sep 2010 at 11:02