[opw-web] Force returnUrl to be http not https for OpenID login



commit a4536f703542187f833bcb572025e1ffcee73b4b
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Mar 10 11:05:29 2014 -0400

    Force returnUrl to be http not https for OpenID login
    
    For some reason both wordpress.com and google.com seem to be unhappy if the
    returnUrl is https - this may have something to do with gnome.org's SSL-proxying
    setup - to get around this for now, just force the protocol to http.

 auth/Hybrid/Provider_Model_OpenID.php |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/auth/Hybrid/Provider_Model_OpenID.php b/auth/Hybrid/Provider_Model_OpenID.php
index f98301a..7145f39 100644
--- a/auth/Hybrid/Provider_Model_OpenID.php
+++ b/auth/Hybrid/Provider_Model_OpenID.php
@@ -53,6 +53,10 @@ class Hybrid_Provider_Model_OpenID extends Hybrid_Provider_Model
 
                $this->api->identity  = $this->openidIdentifier;
                $this->api->returnUrl = $this->endpoint;
+        // HACK - for some reason both wordpress.com and google.com seem to be unhappy if the
+        // returnUrl is https - this may have something to do with gnome.org's SSL-proxying
+        // setup - to get around this for now, just force the protocol to http.
+        $this->api->returnUrl = preg_replace('/^https:/', 'http:', $this->endpoint);
                $this->api->required  = ARRAY( 
                        'namePerson/first'       ,
                        'namePerson/last'        ,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]