Revision: 3195
Author: jaim...@gmail.com
Date: Thu Oct 18 05:10:50 2012
Log: OpenID library updated to commit 9a79bd5, except for
lib/Auth/OpenID/Message.php, which introduces a bug with return_to
parameter.
http://code.google.com/p/simplesamlphp/source/detail?r=3195
Modified:
/trunk/lib/Auth/OpenID/Consumer.php
/trunk/lib/Auth/OpenID/MySQLStore.php
/trunk/lib/Auth/OpenID/Parse.php
/trunk/lib/Auth/OpenID/Server.php
/trunk/lib/Auth/Yadis/Manager.php
/trunk/lib/Auth/Yadis/ParanoidHTTPFetcher.php
=======================================
--- /trunk/lib/Auth/OpenID/Consumer.php Thu May 12 05:26:12 2011
+++ /trunk/lib/Auth/OpenID/Consumer.php Thu Oct 18 05:10:50 2012
@@ -1183,9 +1183,11 @@
function _discoverAndVerify($claimed_id, $to_match_endpoints)
{
// oidutil.log('Performing discovery on %s' % (claimed_id,))
- list($unused, $services) = call_user_func($this->discoverMethod,
- $claimed_id,
- &$this->fetcher);
+ list($unused, $services) =
call_user_func_array($this->discoverMethod,
+ array(
+ $claimed_id,
+
&$this->fetcher,
+ ));
if (!$services) {
return new Auth_OpenID_FailureResponse(null,
=======================================
--- /trunk/lib/Auth/OpenID/MySQLStore.php Thu May 20 04:49:11 2010
+++ /trunk/lib/Auth/OpenID/MySQLStore.php Thu Oct 18 05:10:50 2012
@@ -32,7 +32,7 @@
$this->sql['assoc_table'] =
"CREATE TABLE %s (\n".
- " server_url BLOB NOT NULL,\n".
+ " server_url VARCHAR(2047) NOT NULL,\n".
" handle VARCHAR(255) NOT NULL,\n".
" secret BLOB NOT NULL,\n".
" issued INTEGER NOT NULL,\n".
=======================================
--- /trunk/lib/Auth/OpenID/Parse.php Thu May 12 05:26:12 2011
+++ /trunk/lib/Auth/OpenID/Parse.php Thu Oct 18 05:10:50 2012
@@ -219,7 +219,11 @@
function match($regexp, $text, &$match)
{
if (!is_callable('mb_ereg_search_init')) {
- return preg_match($regexp, $text, $match);
+ if (!preg_match($regexp, $text, $match)) {
+ return false;
+ }
+ $match = $match[0];
+ return true;
}
$regexp = substr($regexp, 1, strlen($regexp) - 2 -
strlen($this->_re_flags));
=======================================
--- /trunk/lib/Auth/OpenID/Server.php Thu May 12 05:26:12 2011
+++ /trunk/lib/Auth/OpenID/Server.php Thu Oct 18 05:10:50 2012
@@ -1704,7 +1704,7 @@
{
if (method_exists($this, "openid_" . $request->mode)) {
$handler = array($this, "openid_" . $request->mode);
- return call_user_func($handler, &$request);
+ return call_user_func_array($handler, array($request));
}
return null;
}
=======================================
--- /trunk/lib/Auth/Yadis/Manager.php Thu May 20 04:49:11 2010
+++ /trunk/lib/Auth/Yadis/Manager.php Thu Oct 18 05:10:50 2012
@@ -411,9 +411,11 @@
if (!$manager || (!$manager->services)) {
$this->destroyManager();
- list($yadis_url, $services) = call_user_func($discover_cb,
- $this->url,
- &$fetcher);
+ list($yadis_url, $services) =
call_user_func_array($discover_cb,
+ array(
+ $this->url,
+ &$fetcher,
+ ));
$manager = $this->createManager($services, $yadis_url);
}
=======================================
--- /trunk/lib/Auth/Yadis/ParanoidHTTPFetcher.php Thu May 20 04:49:11 2010
+++ /trunk/lib/Auth/Yadis/ParanoidHTTPFetcher.php Thu Oct 18 05:10:50 2012
@@ -129,9 +129,19 @@
curl_setopt($c, CURLOPT_URL, $url);
if (defined('Auth_OpenID_VERIFY_HOST')) {
- curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
- curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
+ // set SSL verification options only if
Auth_OpenID_VERIFY_HOST
+ // is explicitly set, otherwise use system default.
+ if (Auth_OpenID_VERIFY_HOST) {
+ curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
+ curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
+ if (defined('Auth_OpenID_CAINFO')) {
+ curl_setopt($c, CURLOPT_CAINFO,
Auth_OpenID_CAINFO);
+ }
+ } else {
+ curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
+ }
}
+
curl_exec($c);
$code = curl_getinfo($c, CURLINFO_HTTP_CODE);
@@ -153,6 +163,7 @@
curl_close($c);
if (defined('Auth_OpenID_VERIFY_HOST') &&
+ Auth_OpenID_VERIFY_HOST == true &&
$this->isHTTPS($url)) {
Auth_OpenID::log('OpenID: Verified SSL host %s using '.
'curl/get', $url);
@@ -202,8 +213,17 @@
array($this, "_writeData"));
if (defined('Auth_OpenID_VERIFY_HOST')) {
- curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
- curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
+ // set SSL verification options only if Auth_OpenID_VERIFY_HOST
+ // is explicitly set, otherwise use system default.
+ if (Auth_OpenID_VERIFY_HOST) {
+ curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true);
+ curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2);
+ if (defined('Auth_OpenID_CAINFO')) {
+ curl_setopt($c, CURLOPT_CAINFO, Auth_OpenID_CAINFO);
+ }
+ } else {
+ curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
+ }
}
curl_exec($c);
@@ -217,7 +237,9 @@
return null;
}
- if (defined('Auth_OpenID_VERIFY_HOST') && $this->isHTTPS($url)) {
+ if (defined('Auth_OpenID_VERIFY_HOST') &&
+ Auth_OpenID_VERIFY_HOST == true &&
+ $this->isHTTPS($url)) {
Auth_OpenID::log('OpenID: Verified SSL host %s using '.
'curl/post', $url);
}
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to simplesamlphp-commits@googlegroups.com.
To unsubscribe from this group, send email to
simplesamlphp-commits+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.