1 |
commit: 75281e477eac5776bf6db39ccb1dfb91f73414c0 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 30 21:20:30 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 21:20:30 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/blogs-gentoo.git/commit/?id=75281e47 |
7 |
|
8 |
Update plugin openid to 3.4.2 |
9 |
|
10 |
plugins/openid/admin_panels.php | 2 +- |
11 |
plugins/openid/lib/Auth/OpenID/AX.php | 14 +++---- |
12 |
plugins/openid/lib/Auth/OpenID/Association.php | 4 +- |
13 |
plugins/openid/lib/Auth/OpenID/Consumer.php | 18 ++++----- |
14 |
plugins/openid/lib/Auth/OpenID/DiffieHellman.php | 2 +- |
15 |
plugins/openid/lib/Auth/OpenID/Discover.php | 2 +- |
16 |
plugins/openid/lib/Auth/OpenID/DumbStore.php | 2 +- |
17 |
plugins/openid/lib/Auth/OpenID/FileStore.php | 2 +- |
18 |
plugins/openid/lib/Auth/OpenID/MDB2Store.php | 2 +- |
19 |
plugins/openid/lib/Auth/OpenID/MemcachedStore.php | 2 +- |
20 |
plugins/openid/lib/Auth/OpenID/Message.php | 6 +-- |
21 |
plugins/openid/lib/Auth/OpenID/PAPE.php | 4 +- |
22 |
plugins/openid/lib/Auth/OpenID/Parse.php | 2 +- |
23 |
plugins/openid/lib/Auth/OpenID/PredisStore.php | 2 +- |
24 |
plugins/openid/lib/Auth/OpenID/SQLStore.php | 2 +- |
25 |
plugins/openid/lib/Auth/OpenID/SReg.php | 2 +- |
26 |
plugins/openid/lib/Auth/OpenID/Server.php | 46 +++++++++++----------- |
27 |
plugins/openid/lib/Auth/OpenID/ServerRequest.php | 2 +- |
28 |
plugins/openid/lib/Auth/Yadis/HTTPFetcher.php | 2 +- |
29 |
plugins/openid/lib/Auth/Yadis/Manager.php | 4 +- |
30 |
.../openid/lib/Auth/Yadis/ParanoidHTTPFetcher.php | 2 +- |
31 |
plugins/openid/lib/Auth/Yadis/ParseHTML.php | 2 +- |
32 |
plugins/openid/lib/Auth/Yadis/XML.php | 4 +- |
33 |
plugins/openid/lib/Auth/Yadis/XRDS.php | 4 +- |
34 |
plugins/openid/lib/Auth/Yadis/XRIRes.php | 2 +- |
35 |
plugins/openid/lib/Auth/Yadis/Yadis.php | 2 +- |
36 |
plugins/openid/login.php | 1 + |
37 |
plugins/openid/openid.php | 2 +- |
38 |
plugins/openid/readme.txt | 8 +++- |
39 |
29 files changed, 78 insertions(+), 71 deletions(-) |
40 |
|
41 |
diff --git a/plugins/openid/admin_panels.php b/plugins/openid/admin_panels.php |
42 |
index b530593..ed65dc6 100644 |
43 |
--- a/plugins/openid/admin_panels.php |
44 |
+++ b/plugins/openid/admin_panels.php |
45 |
@@ -570,7 +570,7 @@ function openid_printSystemStatus() { |
46 |
$status[] = array( 'Curl Support', isset($curl_version), $curl_message ); |
47 |
} |
48 |
|
49 |
- if (extension_loaded('gmp') and @gmp_init(1)) { |
50 |
+ if (extension_loaded('gmp') and @gmp_add(1,1)==2) { |
51 |
$status[] = array( 'Big Integer support', true, 'GMP is installed.' ); |
52 |
} elseif (extension_loaded('bcmath') and @bcadd(1,1)==2) { |
53 |
$status[] = array( 'Big Integer support', true, 'BCMath is installed (though <a href="http://www.php.net/gmp">GMP</a> is preferred).' ); |
54 |
|
55 |
diff --git a/plugins/openid/lib/Auth/OpenID/AX.php b/plugins/openid/lib/Auth/OpenID/AX.php |
56 |
index 7370715..49cf267 100644 |
57 |
--- a/plugins/openid/lib/Auth/OpenID/AX.php |
58 |
+++ b/plugins/openid/lib/Auth/OpenID/AX.php |
59 |
@@ -69,7 +69,7 @@ function Auth_OpenID_AX_checkAlias($alias) |
60 |
* @package OpenID |
61 |
*/ |
62 |
class Auth_OpenID_AX_Error { |
63 |
- function Auth_OpenID_AX_Error($message=null) |
64 |
+ function __construct($message=null) |
65 |
{ |
66 |
$this->message = $message; |
67 |
} |
68 |
@@ -151,7 +151,7 @@ class Auth_OpenID_AX_AttrInfo { |
69 |
* @param string $alias The name that should be given to this |
70 |
* attribute in the request. |
71 |
*/ |
72 |
- function Auth_OpenID_AX_AttrInfo($type_uri, $count, $required, |
73 |
+ function __construct($type_uri, $count, $required, |
74 |
$alias) |
75 |
{ |
76 |
/** |
77 |
@@ -269,7 +269,7 @@ class Auth_OpenID_AX_FetchRequest extends Auth_OpenID_AX_Message { |
78 |
|
79 |
var $mode = 'fetch_request'; |
80 |
|
81 |
- function Auth_OpenID_AX_FetchRequest($update_url=null) |
82 |
+ function __construct($update_url=null) |
83 |
{ |
84 |
/** |
85 |
* requested_attributes: The attributes that have been |
86 |
@@ -540,7 +540,7 @@ class Auth_OpenID_AX_FetchRequest extends Auth_OpenID_AX_Message { |
87 |
*/ |
88 |
class Auth_OpenID_AX_KeyValueMessage extends Auth_OpenID_AX_Message { |
89 |
|
90 |
- function Auth_OpenID_AX_KeyValueMessage() |
91 |
+ function __construct() |
92 |
{ |
93 |
$this->data = array(); |
94 |
} |
95 |
@@ -793,9 +793,9 @@ class Auth_OpenID_AX_KeyValueMessage extends Auth_OpenID_AX_Message { |
96 |
class Auth_OpenID_AX_FetchResponse extends Auth_OpenID_AX_KeyValueMessage { |
97 |
var $mode = 'fetch_response'; |
98 |
|
99 |
- function Auth_OpenID_AX_FetchResponse($update_url=null) |
100 |
+ function __construct($update_url=null) |
101 |
{ |
102 |
- $this->Auth_OpenID_AX_KeyValueMessage(); |
103 |
+ parent::__construct(); |
104 |
$this->update_url = $update_url; |
105 |
} |
106 |
|
107 |
@@ -990,7 +990,7 @@ class Auth_OpenID_AX_StoreResponse extends Auth_OpenID_AX_Message { |
108 |
return new Auth_OpenID_AX_StoreResponse($succeeded, $error_message); |
109 |
} |
110 |
|
111 |
- function Auth_OpenID_AX_StoreResponse($succeeded=true, $error_message=null) |
112 |
+ function __construct($succeeded=true, $error_message=null) |
113 |
{ |
114 |
if ($succeeded) { |
115 |
$this->mode = $this->SUCCESS_MODE; |
116 |
|
117 |
diff --git a/plugins/openid/lib/Auth/OpenID/Association.php b/plugins/openid/lib/Auth/OpenID/Association.php |
118 |
index 2729138..47eac84 100644 |
119 |
--- a/plugins/openid/lib/Auth/OpenID/Association.php |
120 |
+++ b/plugins/openid/lib/Auth/OpenID/Association.php |
121 |
@@ -128,7 +128,7 @@ class Auth_OpenID_Association { |
122 |
* this time is 'HMAC-SHA1' and 'HMAC-SHA256', but new types may |
123 |
* be defined in the future. |
124 |
*/ |
125 |
- function Auth_OpenID_Association( |
126 |
+ function __construct( |
127 |
$handle, $secret, $issued, $lifetime, $assoc_type) |
128 |
{ |
129 |
if (!in_array($assoc_type, |
130 |
@@ -523,7 +523,7 @@ function Auth_OpenID_getEncryptedNegotiator() |
131 |
* @package OpenID |
132 |
*/ |
133 |
class Auth_OpenID_SessionNegotiator { |
134 |
- function Auth_OpenID_SessionNegotiator($allowed_types) |
135 |
+ function __construct($allowed_types) |
136 |
{ |
137 |
$this->allowed_types = array(); |
138 |
$this->setAllowedTypes($allowed_types); |
139 |
|
140 |
diff --git a/plugins/openid/lib/Auth/OpenID/Consumer.php b/plugins/openid/lib/Auth/OpenID/Consumer.php |
141 |
index 9ac0c50..c2b8c34 100644 |
142 |
--- a/plugins/openid/lib/Auth/OpenID/Consumer.php |
143 |
+++ b/plugins/openid/lib/Auth/OpenID/Consumer.php |
144 |
@@ -258,7 +258,7 @@ class Auth_OpenID_Consumer { |
145 |
* when creating the internal consumer object. This is used for |
146 |
* testing. |
147 |
*/ |
148 |
- function Auth_OpenID_Consumer($store, $session = null, |
149 |
+ function __construct($store, $session = null, |
150 |
$consumer_cls = null) |
151 |
{ |
152 |
if ($session === null) { |
153 |
@@ -456,7 +456,7 @@ class Auth_OpenID_DiffieHellmanSHA1ConsumerSession { |
154 |
var $secret_size = 20; |
155 |
var $allowed_assoc_types = array('HMAC-SHA1'); |
156 |
|
157 |
- function Auth_OpenID_DiffieHellmanSHA1ConsumerSession($dh = null) |
158 |
+ function __construct($dh = null) |
159 |
{ |
160 |
if ($dh === null) { |
161 |
$dh = new Auth_OpenID_DiffieHellman(); |
162 |
@@ -611,7 +611,7 @@ class Auth_OpenID_GenericConsumer { |
163 |
* in the module description. The default value is False, which |
164 |
* disables immediate mode. |
165 |
*/ |
166 |
- function Auth_OpenID_GenericConsumer($store) |
167 |
+ function __construct($store) |
168 |
{ |
169 |
$this->store = $store; |
170 |
$this->negotiator = Auth_OpenID_getDefaultNegotiator(); |
171 |
@@ -1757,7 +1757,7 @@ class Auth_OpenID_AuthRequest { |
172 |
* class. Instances of this class are created by the library when |
173 |
* needed. |
174 |
*/ |
175 |
- function Auth_OpenID_AuthRequest($endpoint, $assoc) |
176 |
+ function __construct($endpoint, $assoc) |
177 |
{ |
178 |
$this->assoc = $assoc; |
179 |
$this->endpoint = $endpoint; |
180 |
@@ -2036,7 +2036,7 @@ class Auth_OpenID_SuccessResponse extends Auth_OpenID_ConsumerResponse { |
181 |
/** |
182 |
* @access private |
183 |
*/ |
184 |
- function Auth_OpenID_SuccessResponse($endpoint, $message, $signed_args=null) |
185 |
+ function __construct($endpoint, $message, $signed_args=null) |
186 |
{ |
187 |
$this->endpoint = $endpoint; |
188 |
$this->identity_url = $endpoint->claimed_id; |
189 |
@@ -2139,7 +2139,7 @@ class Auth_OpenID_SuccessResponse extends Auth_OpenID_ConsumerResponse { |
190 |
class Auth_OpenID_FailureResponse extends Auth_OpenID_ConsumerResponse { |
191 |
var $status = Auth_OpenID_FAILURE; |
192 |
|
193 |
- function Auth_OpenID_FailureResponse($endpoint, $message = null, |
194 |
+ function __construct($endpoint, $message = null, |
195 |
$contact = null, $reference = null) |
196 |
{ |
197 |
$this->setEndpoint($endpoint); |
198 |
@@ -2164,7 +2164,7 @@ class Auth_OpenID_TypeURIMismatch extends Auth_OpenID_FailureResponse { |
199 |
* @package OpenID |
200 |
*/ |
201 |
class Auth_OpenID_ServerErrorContainer { |
202 |
- function Auth_OpenID_ServerErrorContainer($error_text, |
203 |
+ function __construct($error_text, |
204 |
$error_code, |
205 |
$message) |
206 |
{ |
207 |
@@ -2202,7 +2202,7 @@ class Auth_OpenID_ServerErrorContainer { |
208 |
class Auth_OpenID_CancelResponse extends Auth_OpenID_ConsumerResponse { |
209 |
var $status = Auth_OpenID_CANCEL; |
210 |
|
211 |
- function Auth_OpenID_CancelResponse($endpoint) |
212 |
+ function __construct($endpoint) |
213 |
{ |
214 |
$this->setEndpoint($endpoint); |
215 |
} |
216 |
@@ -2228,7 +2228,7 @@ class Auth_OpenID_CancelResponse extends Auth_OpenID_ConsumerResponse { |
217 |
class Auth_OpenID_SetupNeededResponse extends Auth_OpenID_ConsumerResponse { |
218 |
var $status = Auth_OpenID_SETUP_NEEDED; |
219 |
|
220 |
- function Auth_OpenID_SetupNeededResponse($endpoint, |
221 |
+ function __construct($endpoint, |
222 |
$setup_url = null) |
223 |
{ |
224 |
$this->setEndpoint($endpoint); |
225 |
|
226 |
diff --git a/plugins/openid/lib/Auth/OpenID/DiffieHellman.php b/plugins/openid/lib/Auth/OpenID/DiffieHellman.php |
227 |
index 3e25b7d..27759a5 100644 |
228 |
--- a/plugins/openid/lib/Auth/OpenID/DiffieHellman.php |
229 |
+++ b/plugins/openid/lib/Auth/OpenID/DiffieHellman.php |
230 |
@@ -47,7 +47,7 @@ class Auth_OpenID_DiffieHellman { |
231 |
var $private; |
232 |
var $lib = null; |
233 |
|
234 |
- function Auth_OpenID_DiffieHellman($mod = null, $gen = null, |
235 |
+ function __construct($mod = null, $gen = null, |
236 |
$private = null, $lib = null) |
237 |
{ |
238 |
if ($lib === null) { |
239 |
|
240 |
diff --git a/plugins/openid/lib/Auth/OpenID/Discover.php b/plugins/openid/lib/Auth/OpenID/Discover.php |
241 |
index 7b0c640..569402e 100644 |
242 |
--- a/plugins/openid/lib/Auth/OpenID/Discover.php |
243 |
+++ b/plugins/openid/lib/Auth/OpenID/Discover.php |
244 |
@@ -62,7 +62,7 @@ function Auth_OpenID_getOpenIDTypeName($type_uri) { |
245 |
* Object representing an OpenID service endpoint. |
246 |
*/ |
247 |
class Auth_OpenID_ServiceEndpoint { |
248 |
- function Auth_OpenID_ServiceEndpoint() |
249 |
+ function __construct() |
250 |
{ |
251 |
$this->claimed_id = null; |
252 |
$this->server_url = null; |
253 |
|
254 |
diff --git a/plugins/openid/lib/Auth/OpenID/DumbStore.php b/plugins/openid/lib/Auth/OpenID/DumbStore.php |
255 |
index e8f29ac..b79bf65 100644 |
256 |
--- a/plugins/openid/lib/Auth/OpenID/DumbStore.php |
257 |
+++ b/plugins/openid/lib/Auth/OpenID/DumbStore.php |
258 |
@@ -50,7 +50,7 @@ class Auth_OpenID_DumbStore extends Auth_OpenID_OpenIDStore { |
259 |
* @param string secret_phrase The phrase used to create the auth |
260 |
* key returned by getAuthKey |
261 |
*/ |
262 |
- function Auth_OpenID_DumbStore($secret_phrase) |
263 |
+ function __construct($secret_phrase) |
264 |
{ |
265 |
$this->auth_key = Auth_OpenID_SHA1($secret_phrase); |
266 |
} |
267 |
|
268 |
diff --git a/plugins/openid/lib/Auth/OpenID/FileStore.php b/plugins/openid/lib/Auth/OpenID/FileStore.php |
269 |
index d74f83d..730225e 100644 |
270 |
--- a/plugins/openid/lib/Auth/OpenID/FileStore.php |
271 |
+++ b/plugins/openid/lib/Auth/OpenID/FileStore.php |
272 |
@@ -46,7 +46,7 @@ class Auth_OpenID_FileStore extends Auth_OpenID_OpenIDStore { |
273 |
* @param string $directory This is the directory to put the store |
274 |
* directories in. |
275 |
*/ |
276 |
- function Auth_OpenID_FileStore($directory) |
277 |
+ function __construct($directory) |
278 |
{ |
279 |
if (!Auth_OpenID::ensureDir($directory)) { |
280 |
trigger_error('Not a directory and failed to create: ' |
281 |
|
282 |
diff --git a/plugins/openid/lib/Auth/OpenID/MDB2Store.php b/plugins/openid/lib/Auth/OpenID/MDB2Store.php |
283 |
index fb27d5c..9349702 100644 |
284 |
--- a/plugins/openid/lib/Auth/OpenID/MDB2Store.php |
285 |
+++ b/plugins/openid/lib/Auth/OpenID/MDB2Store.php |
286 |
@@ -62,7 +62,7 @@ class Auth_OpenID_MDB2Store extends Auth_OpenID_OpenIDStore { |
287 |
* the name of the table used for storing nonces. The default |
288 |
* value is 'oid_nonces'. |
289 |
*/ |
290 |
- function Auth_OpenID_MDB2Store($connection, |
291 |
+ function __construct($connection, |
292 |
$associations_table = null, |
293 |
$nonces_table = null) |
294 |
{ |
295 |
|
296 |
diff --git a/plugins/openid/lib/Auth/OpenID/MemcachedStore.php b/plugins/openid/lib/Auth/OpenID/MemcachedStore.php |
297 |
index fc10800..1078586 100644 |
298 |
--- a/plugins/openid/lib/Auth/OpenID/MemcachedStore.php |
299 |
+++ b/plugins/openid/lib/Auth/OpenID/MemcachedStore.php |
300 |
@@ -41,7 +41,7 @@ class Auth_OpenID_MemcachedStore extends Auth_OpenID_OpenIDStore { |
301 |
* |
302 |
* @param resource connection Memcache connection resourse |
303 |
*/ |
304 |
- function Auth_OpenID_MemcachedStore($connection, $compress = false) |
305 |
+ function __construct($connection, $compress = false) |
306 |
{ |
307 |
$this->connection = $connection; |
308 |
$this->compress = $compress ? MEMCACHE_COMPRESSED : 0; |
309 |
|
310 |
diff --git a/plugins/openid/lib/Auth/OpenID/Message.php b/plugins/openid/lib/Auth/OpenID/Message.php |
311 |
index 16ec1c1..41a8a31 100644 |
312 |
--- a/plugins/openid/lib/Auth/OpenID/Message.php |
313 |
+++ b/plugins/openid/lib/Auth/OpenID/Message.php |
314 |
@@ -127,7 +127,7 @@ class Auth_OpenID_Mapping { |
315 |
* Initialize a mapping. If $classic_array is specified, its keys |
316 |
* and values are used to populate the mapping. |
317 |
*/ |
318 |
- function Auth_OpenID_Mapping($classic_array = null) |
319 |
+ function __construct($classic_array = null) |
320 |
{ |
321 |
$this->keys = array(); |
322 |
$this->values = array(); |
323 |
@@ -274,7 +274,7 @@ class Auth_OpenID_Mapping { |
324 |
* @package OpenID |
325 |
*/ |
326 |
class Auth_OpenID_NamespaceMap { |
327 |
- function Auth_OpenID_NamespaceMap() |
328 |
+ function __construct() |
329 |
{ |
330 |
$this->alias_to_namespace = new Auth_OpenID_Mapping(); |
331 |
$this->namespace_to_alias = new Auth_OpenID_Mapping(); |
332 |
@@ -414,7 +414,7 @@ class Auth_OpenID_NamespaceMap { |
333 |
*/ |
334 |
class Auth_OpenID_Message { |
335 |
|
336 |
- function Auth_OpenID_Message($openid_namespace = null) |
337 |
+ function __construct($openid_namespace = null) |
338 |
{ |
339 |
// Create an empty Message |
340 |
$this->allowed_openid_namespaces = array( |
341 |
|
342 |
diff --git a/plugins/openid/lib/Auth/OpenID/PAPE.php b/plugins/openid/lib/Auth/OpenID/PAPE.php |
343 |
index f08ca8b..a910fd6 100644 |
344 |
--- a/plugins/openid/lib/Auth/OpenID/PAPE.php |
345 |
+++ b/plugins/openid/lib/Auth/OpenID/PAPE.php |
346 |
@@ -37,7 +37,7 @@ class Auth_OpenID_PAPE_Request extends Auth_OpenID_Extension { |
347 |
var $ns_alias = 'pape'; |
348 |
var $ns_uri = Auth_OpenID_PAPE_NS_URI; |
349 |
|
350 |
- function Auth_OpenID_PAPE_Request($preferred_auth_policies=null, |
351 |
+ function __construct($preferred_auth_policies=null, |
352 |
$max_auth_age=null) |
353 |
{ |
354 |
if ($preferred_auth_policies === null) { |
355 |
@@ -161,7 +161,7 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension { |
356 |
var $ns_alias = 'pape'; |
357 |
var $ns_uri = Auth_OpenID_PAPE_NS_URI; |
358 |
|
359 |
- function Auth_OpenID_PAPE_Response($auth_policies=null, $auth_time=null, |
360 |
+ function __construct($auth_policies=null, $auth_time=null, |
361 |
$nist_auth_level=null) |
362 |
{ |
363 |
if ($auth_policies) { |
364 |
|
365 |
diff --git a/plugins/openid/lib/Auth/OpenID/Parse.php b/plugins/openid/lib/Auth/OpenID/Parse.php |
366 |
index 0461bdc..9c0a255 100644 |
367 |
--- a/plugins/openid/lib/Auth/OpenID/Parse.php |
368 |
+++ b/plugins/openid/lib/Auth/OpenID/Parse.php |
369 |
@@ -108,7 +108,7 @@ class Auth_OpenID_Parse { |
370 |
var $_open_tag_expr = "<%s\b"; |
371 |
var $_close_tag_expr = "<((\/%s\b)|(%s[^>\/]*\/))>"; |
372 |
|
373 |
- function Auth_OpenID_Parse() |
374 |
+ function __construct() |
375 |
{ |
376 |
$this->_link_find = sprintf("/<link\b(?!:)([^>]*)(?!<)>/%s", |
377 |
$this->_re_flags); |
378 |
|
379 |
diff --git a/plugins/openid/lib/Auth/OpenID/PredisStore.php b/plugins/openid/lib/Auth/OpenID/PredisStore.php |
380 |
index 14ecbbd..96384a8 100644 |
381 |
--- a/plugins/openid/lib/Auth/OpenID/PredisStore.php |
382 |
+++ b/plugins/openid/lib/Auth/OpenID/PredisStore.php |
383 |
@@ -45,7 +45,7 @@ class Auth_OpenID_PredisStore extends Auth_OpenID_OpenIDStore { |
384 |
* @param \Predis\Client $redis Predis client object |
385 |
* @param string $prefix Prefix for all keys stored to the Redis |
386 |
*/ |
387 |
- function Auth_OpenID_PredisStore(\Predis\Client $redis, $prefix = '') |
388 |
+ function __construct(\Predis\Client $redis, $prefix = '') |
389 |
{ |
390 |
$this->prefix = $prefix; |
391 |
$this->redis = $redis; |
392 |
|
393 |
diff --git a/plugins/openid/lib/Auth/OpenID/SQLStore.php b/plugins/openid/lib/Auth/OpenID/SQLStore.php |
394 |
index 2dc731a..a9e2ad5 100644 |
395 |
--- a/plugins/openid/lib/Auth/OpenID/SQLStore.php |
396 |
+++ b/plugins/openid/lib/Auth/OpenID/SQLStore.php |
397 |
@@ -75,7 +75,7 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore { |
398 |
* the name of the table used for storing nonces. The default |
399 |
* value is 'oid_nonces'. |
400 |
*/ |
401 |
- function Auth_OpenID_SQLStore($connection, |
402 |
+ function __construct($connection, |
403 |
$associations_table = null, |
404 |
$nonces_table = null) |
405 |
{ |
406 |
|
407 |
diff --git a/plugins/openid/lib/Auth/OpenID/SReg.php b/plugins/openid/lib/Auth/OpenID/SReg.php |
408 |
index 5ece707..ae1eb91 100644 |
409 |
--- a/plugins/openid/lib/Auth/OpenID/SReg.php |
410 |
+++ b/plugins/openid/lib/Auth/OpenID/SReg.php |
411 |
@@ -418,7 +418,7 @@ class Auth_OpenID_SRegResponse extends Auth_OpenID_SRegBase { |
412 |
|
413 |
var $ns_alias = 'sreg'; |
414 |
|
415 |
- function Auth_OpenID_SRegResponse($data=null, |
416 |
+ function __construct($data=null, |
417 |
$sreg_ns_uri=Auth_OpenID_SREG_NS_URI) |
418 |
{ |
419 |
if ($data === null) { |
420 |
|
421 |
diff --git a/plugins/openid/lib/Auth/OpenID/Server.php b/plugins/openid/lib/Auth/OpenID/Server.php |
422 |
index 9887d1e..5984c00 100644 |
423 |
--- a/plugins/openid/lib/Auth/OpenID/Server.php |
424 |
+++ b/plugins/openid/lib/Auth/OpenID/Server.php |
425 |
@@ -148,7 +148,7 @@ class Auth_OpenID_ServerError { |
426 |
/** |
427 |
* @access private |
428 |
*/ |
429 |
- function Auth_OpenID_ServerError($message = null, $text = null, |
430 |
+ function __construct($message = null, $text = null, |
431 |
$reference = null, $contact = null) |
432 |
{ |
433 |
$this->message = $message; |
434 |
@@ -292,10 +292,10 @@ class Auth_OpenID_ServerError { |
435 |
* @package OpenID |
436 |
*/ |
437 |
class Auth_OpenID_NoReturnToError extends Auth_OpenID_ServerError { |
438 |
- function Auth_OpenID_NoReturnToError($message = null, |
439 |
+ function __construct($message = null, |
440 |
$text = "No return_to URL available") |
441 |
{ |
442 |
- parent::Auth_OpenID_ServerError($message, $text); |
443 |
+ parent::__construct($message, $text); |
444 |
} |
445 |
|
446 |
function toString() |
447 |
@@ -310,10 +310,10 @@ class Auth_OpenID_NoReturnToError extends Auth_OpenID_ServerError { |
448 |
* @package OpenID |
449 |
*/ |
450 |
class Auth_OpenID_MalformedReturnURL extends Auth_OpenID_ServerError { |
451 |
- function Auth_OpenID_MalformedReturnURL($message, $return_to) |
452 |
+ function __construct($message, $return_to) |
453 |
{ |
454 |
$this->return_to = $return_to; |
455 |
- parent::Auth_OpenID_ServerError($message, "malformed return_to URL"); |
456 |
+ parent::__construct($message, "malformed return_to URL"); |
457 |
} |
458 |
} |
459 |
|
460 |
@@ -323,10 +323,10 @@ class Auth_OpenID_MalformedReturnURL extends Auth_OpenID_ServerError { |
461 |
* @package OpenID |
462 |
*/ |
463 |
class Auth_OpenID_MalformedTrustRoot extends Auth_OpenID_ServerError { |
464 |
- function Auth_OpenID_MalformedTrustRoot($message = null, |
465 |
+ function __construct($message = null, |
466 |
$text = "Malformed trust root") |
467 |
{ |
468 |
- parent::Auth_OpenID_ServerError($message, $text); |
469 |
+ parent::__construct($message, $text); |
470 |
} |
471 |
|
472 |
function toString() |
473 |
@@ -353,7 +353,7 @@ class Auth_OpenID_CheckAuthRequest extends Auth_OpenID_Request { |
474 |
var $mode = "check_authentication"; |
475 |
var $invalidate_handle = null; |
476 |
|
477 |
- function Auth_OpenID_CheckAuthRequest($assoc_handle, $signed, |
478 |
+ function __construct($assoc_handle, $signed, |
479 |
$invalidate_handle = null) |
480 |
{ |
481 |
$this->assoc_handle = $assoc_handle; |
482 |
@@ -463,7 +463,7 @@ class Auth_OpenID_DiffieHellmanSHA1ServerSession { |
483 |
var $allowed_assoc_types = array('HMAC-SHA1'); |
484 |
var $hash_func = 'Auth_OpenID_SHA1'; |
485 |
|
486 |
- function Auth_OpenID_DiffieHellmanSHA1ServerSession($dh, $consumer_pubkey) |
487 |
+ function __construct($dh, $consumer_pubkey) |
488 |
{ |
489 |
$this->dh = $dh; |
490 |
$this->consumer_pubkey = $consumer_pubkey; |
491 |
@@ -590,7 +590,7 @@ class Auth_OpenID_AssociateRequest extends Auth_OpenID_Request { |
492 |
'DH-SHA256' => 'Auth_OpenID_DiffieHellmanSHA256ServerSession'); |
493 |
} |
494 |
|
495 |
- function Auth_OpenID_AssociateRequest($session, $assoc_type) |
496 |
+ function __construct($session, $assoc_type) |
497 |
{ |
498 |
$this->session = $session; |
499 |
$this->namespace = Auth_OpenID_OPENID2_NS; |
500 |
@@ -763,7 +763,7 @@ class Auth_OpenID_CheckIDRequest extends Auth_OpenID_Request { |
501 |
} |
502 |
} |
503 |
|
504 |
- function Auth_OpenID_CheckIDRequest($identity, $return_to, |
505 |
+ function __construct($identity, $return_to, |
506 |
$trust_root = null, $immediate = false, |
507 |
$assoc_handle = null, $server = null, |
508 |
$claimed_id = null) |
509 |
@@ -1184,7 +1184,7 @@ class Auth_OpenID_CheckIDRequest extends Auth_OpenID_Request { |
510 |
*/ |
511 |
class Auth_OpenID_ServerResponse { |
512 |
|
513 |
- function Auth_OpenID_ServerResponse($request) |
514 |
+ function __construct($request) |
515 |
{ |
516 |
$this->request = $request; |
517 |
$this->fields = new Auth_OpenID_Message($this->request->namespace); |
518 |
@@ -1271,7 +1271,7 @@ class Auth_OpenID_WebResponse { |
519 |
var $code = AUTH_OPENID_HTTP_OK; |
520 |
var $body = ""; |
521 |
|
522 |
- function Auth_OpenID_WebResponse($code = null, $headers = null, |
523 |
+ function __construct($code = null, $headers = null, |
524 |
$body = null) |
525 |
{ |
526 |
if ($code) { |
527 |
@@ -1311,7 +1311,7 @@ class Auth_OpenID_Signatory { |
528 |
/** |
529 |
* Create a new signatory using a given store. |
530 |
*/ |
531 |
- function Auth_OpenID_Signatory($store) |
532 |
+ function __construct($store) |
533 |
{ |
534 |
// assert store is not None |
535 |
$this->store = $store; |
536 |
@@ -1483,7 +1483,7 @@ class Auth_OpenID_Encoder { |
537 |
*/ |
538 |
class Auth_OpenID_SigningEncoder extends Auth_OpenID_Encoder { |
539 |
|
540 |
- function Auth_OpenID_SigningEncoder($signatory) |
541 |
+ function __construct($signatory) |
542 |
{ |
543 |
$this->signatory = $signatory; |
544 |
} |
545 |
@@ -1521,7 +1521,7 @@ class Auth_OpenID_SigningEncoder extends Auth_OpenID_Encoder { |
546 |
*/ |
547 |
class Auth_OpenID_Decoder { |
548 |
|
549 |
- function Auth_OpenID_Decoder($server) |
550 |
+ function __construct($server) |
551 |
{ |
552 |
$this->server = $server; |
553 |
|
554 |
@@ -1604,9 +1604,11 @@ class Auth_OpenID_Decoder { |
555 |
* @package OpenID |
556 |
*/ |
557 |
class Auth_OpenID_EncodingError { |
558 |
- function Auth_OpenID_EncodingError($response) |
559 |
+ function __construct($response = null) |
560 |
{ |
561 |
- $this->response = $response; |
562 |
+ if ($response !== null) { |
563 |
+ $this->response = $response; |
564 |
+ } |
565 |
} |
566 |
} |
567 |
|
568 |
@@ -1616,7 +1618,7 @@ class Auth_OpenID_EncodingError { |
569 |
* @package OpenID |
570 |
*/ |
571 |
class Auth_OpenID_AlreadySigned extends Auth_OpenID_EncodingError { |
572 |
- // This response is already signed. |
573 |
+ |
574 |
} |
575 |
|
576 |
/** |
577 |
@@ -1626,10 +1628,10 @@ class Auth_OpenID_AlreadySigned extends Auth_OpenID_EncodingError { |
578 |
* @package OpenID |
579 |
*/ |
580 |
class Auth_OpenID_UntrustedReturnURL extends Auth_OpenID_ServerError { |
581 |
- function Auth_OpenID_UntrustedReturnURL($message, $return_to, |
582 |
+ function __construct($message, $return_to, |
583 |
$trust_root) |
584 |
{ |
585 |
- parent::Auth_OpenID_ServerError($message, "Untrusted return_to URL"); |
586 |
+ parent::__construct($message, "Untrusted return_to URL"); |
587 |
$this->return_to = $return_to; |
588 |
$this->trust_root = $trust_root; |
589 |
} |
590 |
@@ -1679,7 +1681,7 @@ class Auth_OpenID_UntrustedReturnURL extends Auth_OpenID_ServerError { |
591 |
* @package OpenID |
592 |
*/ |
593 |
class Auth_OpenID_Server { |
594 |
- function Auth_OpenID_Server($store, $op_endpoint=null) |
595 |
+ function __construct($store, $op_endpoint=null) |
596 |
{ |
597 |
$this->store = $store; |
598 |
$this->signatory = new Auth_OpenID_Signatory($this->store); |
599 |
|
600 |
diff --git a/plugins/openid/lib/Auth/OpenID/ServerRequest.php b/plugins/openid/lib/Auth/OpenID/ServerRequest.php |
601 |
index 69222a5..84c7758 100644 |
602 |
--- a/plugins/openid/lib/Auth/OpenID/ServerRequest.php |
603 |
+++ b/plugins/openid/lib/Auth/OpenID/ServerRequest.php |
604 |
@@ -28,7 +28,7 @@ require_once "Auth/OpenID.php"; |
605 |
* @package OpenID |
606 |
*/ |
607 |
class Auth_OpenID_ServerRequest { |
608 |
- function Auth_OpenID_ServerRequest() |
609 |
+ function __construct() |
610 |
{ |
611 |
$this->mode = null; |
612 |
} |
613 |
|
614 |
diff --git a/plugins/openid/lib/Auth/Yadis/HTTPFetcher.php b/plugins/openid/lib/Auth/Yadis/HTTPFetcher.php |
615 |
index 148cde1..76bc323 100644 |
616 |
--- a/plugins/openid/lib/Auth/Yadis/HTTPFetcher.php |
617 |
+++ b/plugins/openid/lib/Auth/Yadis/HTTPFetcher.php |
618 |
@@ -23,7 +23,7 @@ define('Auth_OpenID_USER_AGENT', |
619 |
'php-openid/'.Auth_OpenID_VERSION.' (php/'.phpversion().')'); |
620 |
|
621 |
class Auth_Yadis_HTTPResponse { |
622 |
- function Auth_Yadis_HTTPResponse($final_url = null, $status = null, |
623 |
+ function __construct($final_url = null, $status = null, |
624 |
$headers = null, $body = null) |
625 |
{ |
626 |
$this->final_url = $final_url; |
627 |
|
628 |
diff --git a/plugins/openid/lib/Auth/Yadis/Manager.php b/plugins/openid/lib/Auth/Yadis/Manager.php |
629 |
index 664521c..8c8c3e5 100644 |
630 |
--- a/plugins/openid/lib/Auth/Yadis/Manager.php |
631 |
+++ b/plugins/openid/lib/Auth/Yadis/Manager.php |
632 |
@@ -280,7 +280,7 @@ class Auth_Yadis_Manager { |
633 |
* |
634 |
* @access private |
635 |
*/ |
636 |
- function Auth_Yadis_Manager($starting_url, $yadis_url, |
637 |
+ function __construct($starting_url, $yadis_url, |
638 |
$services, $session_key) |
639 |
{ |
640 |
// The URL that was used to initiate the Yadis protocol |
641 |
@@ -387,7 +387,7 @@ class Auth_Yadis_Discovery { |
642 |
* @param string $session_key_suffix The optional session key |
643 |
* suffix override. |
644 |
*/ |
645 |
- function Auth_Yadis_Discovery($session, $url, |
646 |
+ function __construct($session, $url, |
647 |
$session_key_suffix = null) |
648 |
{ |
649 |
/// Initialize a discovery object |
650 |
|
651 |
diff --git a/plugins/openid/lib/Auth/Yadis/ParanoidHTTPFetcher.php b/plugins/openid/lib/Auth/Yadis/ParanoidHTTPFetcher.php |
652 |
index 627ea9a..d15969b 100644 |
653 |
--- a/plugins/openid/lib/Auth/Yadis/ParanoidHTTPFetcher.php |
654 |
+++ b/plugins/openid/lib/Auth/Yadis/ParanoidHTTPFetcher.php |
655 |
@@ -27,7 +27,7 @@ require_once "Auth/OpenID.php"; |
656 |
* @package OpenID |
657 |
*/ |
658 |
class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher { |
659 |
- function Auth_Yadis_ParanoidHTTPFetcher() |
660 |
+ function __construct() |
661 |
{ |
662 |
$this->reset(); |
663 |
} |
664 |
|
665 |
diff --git a/plugins/openid/lib/Auth/Yadis/ParseHTML.php b/plugins/openid/lib/Auth/Yadis/ParseHTML.php |
666 |
index 255d7cd..e0e9043 100644 |
667 |
--- a/plugins/openid/lib/Auth/Yadis/ParseHTML.php |
668 |
+++ b/plugins/openid/lib/Auth/Yadis/ParseHTML.php |
669 |
@@ -43,7 +43,7 @@ class Auth_Yadis_ParseHTML { |
670 |
*/ |
671 |
var $_attr_find = '\b([-\w]+)=(".*?"|\'.*?\'|.+?)[\/\s>]'; |
672 |
|
673 |
- function Auth_Yadis_ParseHTML() |
674 |
+ function __construct() |
675 |
{ |
676 |
$this->_attr_find = sprintf("/%s/%s", |
677 |
$this->_attr_find, |
678 |
|
679 |
diff --git a/plugins/openid/lib/Auth/Yadis/XML.php b/plugins/openid/lib/Auth/Yadis/XML.php |
680 |
index 2b8a20e..c96b2a9 100644 |
681 |
--- a/plugins/openid/lib/Auth/Yadis/XML.php |
682 |
+++ b/plugins/openid/lib/Auth/Yadis/XML.php |
683 |
@@ -134,7 +134,7 @@ class Auth_Yadis_XMLParser { |
684 |
* @package OpenID |
685 |
*/ |
686 |
class Auth_Yadis_domxml extends Auth_Yadis_XMLParser { |
687 |
- function Auth_Yadis_domxml() |
688 |
+ function __construct() |
689 |
{ |
690 |
$this->xml = null; |
691 |
$this->doc = null; |
692 |
@@ -217,7 +217,7 @@ class Auth_Yadis_domxml extends Auth_Yadis_XMLParser { |
693 |
* @package OpenID |
694 |
*/ |
695 |
class Auth_Yadis_dom extends Auth_Yadis_XMLParser { |
696 |
- function Auth_Yadis_dom() |
697 |
+ function __construct() |
698 |
{ |
699 |
$this->xml = null; |
700 |
$this->doc = null; |
701 |
|
702 |
diff --git a/plugins/openid/lib/Auth/Yadis/XRDS.php b/plugins/openid/lib/Auth/Yadis/XRDS.php |
703 |
index 044d1e7..4f1ede0 100644 |
704 |
--- a/plugins/openid/lib/Auth/Yadis/XRDS.php |
705 |
+++ b/plugins/openid/lib/Auth/Yadis/XRDS.php |
706 |
@@ -85,7 +85,7 @@ class Auth_Yadis_Service { |
707 |
/** |
708 |
* Creates an empty service object. |
709 |
*/ |
710 |
- function Auth_Yadis_Service() |
711 |
+ function __construct() |
712 |
{ |
713 |
$this->element = null; |
714 |
$this->parser = null; |
715 |
@@ -255,7 +255,7 @@ class Auth_Yadis_XRDS { |
716 |
* Instantiate a Auth_Yadis_XRDS object. Requires an XPath |
717 |
* instance which has been used to parse a valid XRDS document. |
718 |
*/ |
719 |
- function Auth_Yadis_XRDS($xmlParser, $xrdNodes) |
720 |
+ function __construct($xmlParser, $xrdNodes) |
721 |
{ |
722 |
$this->parser = $xmlParser; |
723 |
$this->xrdNode = $xrdNodes[count($xrdNodes) - 1]; |
724 |
|
725 |
diff --git a/plugins/openid/lib/Auth/Yadis/XRIRes.php b/plugins/openid/lib/Auth/Yadis/XRIRes.php |
726 |
index 5e11587..b484bee 100644 |
727 |
--- a/plugins/openid/lib/Auth/Yadis/XRIRes.php |
728 |
+++ b/plugins/openid/lib/Auth/Yadis/XRIRes.php |
729 |
@@ -8,7 +8,7 @@ require_once 'Auth/Yadis/XRDS.php'; |
730 |
require_once 'Auth/Yadis/XRI.php'; |
731 |
|
732 |
class Auth_Yadis_ProxyResolver { |
733 |
- function Auth_Yadis_ProxyResolver($fetcher, $proxy_url = null) |
734 |
+ function __construct($fetcher, $proxy_url = null) |
735 |
{ |
736 |
$this->fetcher = $fetcher; |
737 |
$this->proxy_url = $proxy_url; |
738 |
|
739 |
diff --git a/plugins/openid/lib/Auth/Yadis/Yadis.php b/plugins/openid/lib/Auth/Yadis/Yadis.php |
740 |
index f885367..5be56da 100644 |
741 |
--- a/plugins/openid/lib/Auth/Yadis/Yadis.php |
742 |
+++ b/plugins/openid/lib/Auth/Yadis/Yadis.php |
743 |
@@ -68,7 +68,7 @@ class Auth_Yadis_DiscoveryResult { |
744 |
// Did the discovery fail miserably? |
745 |
var $failed = false; |
746 |
|
747 |
- function Auth_Yadis_DiscoveryResult($request_uri) |
748 |
+ function __construct($request_uri) |
749 |
{ |
750 |
// Initialize the state of the object |
751 |
// sets all attributes to None except the request_uri |
752 |
|
753 |
diff --git a/plugins/openid/login.php b/plugins/openid/login.php |
754 |
index ee4da24..c0b95a1 100644 |
755 |
--- a/plugins/openid/login.php |
756 |
+++ b/plugins/openid/login.php |
757 |
@@ -37,6 +37,7 @@ function openid_authenticate($user) { |
758 |
|
759 |
if ( !wp_verify_nonce($_REQUEST['_wpnonce'], 'openid_login_' . md5($identity_url)) ) { |
760 |
$user = new WP_Error('openid_login_error', __('Error during OpenID authentication. Please try again. (invalid nonce)', 'openid')); |
761 |
+ return $user; |
762 |
} |
763 |
|
764 |
if ( $identity_url ) { |
765 |
|
766 |
diff --git a/plugins/openid/openid.php b/plugins/openid/openid.php |
767 |
index 0de281b..5ad309f 100644 |
768 |
--- a/plugins/openid/openid.php |
769 |
+++ b/plugins/openid/openid.php |
770 |
@@ -5,7 +5,7 @@ |
771 |
* Description: Allows the use of OpenID for account registration, authentication, and commenting. Also includes an OpenID provider which can turn WordPress author URLs into OpenIDs. |
772 |
* Author: DiSo Development Team |
773 |
* Author URI: http://diso-project.org/ |
774 |
- * Version: 3.4.1 |
775 |
+ * Version: 3.4.2 |
776 |
* License: Apache 2.0 |
777 |
* License URI: https://www.apache.org/licenses/LICENSE-2.0 |
778 |
* Text Domain: openid |
779 |
|
780 |
diff --git a/plugins/openid/readme.txt b/plugins/openid/readme.txt |
781 |
index b3fb63b..a7b350e 100644 |
782 |
--- a/plugins/openid/readme.txt |
783 |
+++ b/plugins/openid/readme.txt |
784 |
@@ -2,8 +2,8 @@ |
785 |
Contributors: willnorris, factoryjoe, pfefferle |
786 |
Tags: openid, authentication, login, comments |
787 |
Requires at least: 2.8 |
788 |
-Tested up to: 4.4.1 |
789 |
-Stable tag: 3.4.1 |
790 |
+Tested up to: 4.6.1 |
791 |
+Stable tag: 3.4.2 |
792 |
License: Apache 2.0 |
793 |
License URI: https://www.apache.org/licenses/LICENSE-2.0 |
794 |
|
795 |
@@ -105,6 +105,10 @@ report at <http://code.google.com/p/diso/issues/list>. |
796 |
Project maintined on github at |
797 |
[diso/wordpress-openid](https://github.com/diso/wordpress-openid). |
798 |
|
799 |
+= version 3.4.2 (Nov 20, 2016) = |
800 |
+ - update to latest OpenID library |
801 |
+ - fixed error response if nonce doesn't match https://github.com/diso/wordpress-openid/pull/46 |
802 |
+ |
803 |
= version 3.4.1 (Jan 31, 2016) = |
804 |
- update to latest OpenID library. Full changelog [on github](https://github.com/openid/php-openid). |
805 |
- fix comment bug https://wordpress.org/support/topic/false-error-please-fill-the-required-fields-name-email-commenting?replies=5 |