]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
use CGI->url to get current absolute cgi url for openid login process
authorJoey Hess <joey@kitenet.net>
Sat, 25 Dec 2010 19:08:22 +0000 (15:08 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 25 Dec 2010 19:08:22 +0000 (15:08 -0400)
IkiWiki/Plugin/openid.pm
doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn

index 0cb8d6289bf958bd030b074a2984e0584dc52b8b..ce0990e40442ea63d762ac20ddcd3e1ed0420c38 100644 (file)
@@ -148,7 +148,7 @@ sub validate ($$$;$) {
        }
 
        my $cgiurl=$config{openid_cgiurl};
-       $cgiurl=$config{cgiurl} if ! defined $cgiurl;
+       $cgiurl=$q->url if ! defined $cgiurl;
 
        my $trust_root=$config{openid_realm};
        $trust_root=$cgiurl if ! defined $trust_root;
@@ -249,7 +249,7 @@ sub getobj ($$) {
        }
        
        my $cgiurl=$config{openid_cgiurl};
-       $cgiurl=$config{cgiurl} if ! defined $cgiurl;
+       $cgiurl=$q->url if ! defined $cgiurl;
 
        return Net::OpenID::Consumer->new(
                ua => $ua,
index ba525989505cd4214faf85fa05c75fc7c9c603e7..b069ee2bd195e4bbae68a7a6e2c123ebeaf1478d 100644 (file)
@@ -328,4 +328,6 @@ Update: I had to revert part of 296e5cb2fd3690e998b3824d54d317933c595873,
 since it broke openid logins. The openid object requires a complete,
 not a relative cgiurl. I'm not sure if my changing that back to using
 `$config{cgiurl}` will force users back to eg, the non-https version of a
-site when logging in via openid. smcv? --[[Joey]] 
+site when logging in via openid.
+
+> Ok, changed it to use `CGI->url` to get the current absolute cgi url. --[[Joey]]