File tree 4 files changed +20
-7
lines changed
4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 97
97
"! \"#$%&'()*+,-./:;<=>?@[ \\]^_`{|}~ " );
98
98
99
99
if (Auth_OpenID_getMathLib () === null ) {
100
- define ( ' Auth_OpenID_NO_MATH_SUPPORT ' , true );
100
+ Auth_OpenID_setNoMathSupport ( );
101
101
}
102
102
103
103
/**
@@ -574,4 +574,4 @@ function update(&$dest, &$src)
574
574
}
575
575
}
576
576
}
577
- ?>
577
+ ?>
Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ function Auth_OpenID_getDefaultAssociationOrder()
423
423
{
424
424
$ order = array ();
425
425
426
- if (!defined ( ' Auth_OpenID_NO_MATH_SUPPORT ' )) {
426
+ if (!Auth_OpenID_noMathSupport ( )) {
427
427
$ order [] = array ('HMAC-SHA1 ' , 'DH-SHA1 ' );
428
428
429
429
if (Auth_OpenID_HMACSHA256_SUPPORTED) {
Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ function &Auth_OpenID_getMathLib()
427
427
return $ lib ;
428
428
}
429
429
430
- if (defined ( ' Auth_OpenID_NO_MATH_SUPPORT ' )) {
430
+ if (Auth_OpenID_noMathSupport ( )) {
431
431
$ null = null ;
432
432
return $ null ;
433
433
}
@@ -443,7 +443,7 @@ function &Auth_OpenID_getMathLib()
443
443
}
444
444
$ triedstr = implode (", " , $ tried );
445
445
446
- define ( ' Auth_OpenID_NO_MATH_SUPPORT ' , true );
446
+ Auth_OpenID_setNoMathSupport ( );
447
447
448
448
$ result = null ;
449
449
return $ result ;
@@ -456,4 +456,16 @@ function &Auth_OpenID_getMathLib()
456
456
return $ lib ;
457
457
}
458
458
459
+ function Auth_OpenID_setNoMathSupport ()
460
+ {
461
+ if (!defined ('Auth_OpenID_NO_MATH_SUPPORT ' )) {
462
+ define ('Auth_OpenID_NO_MATH_SUPPORT ' , true );
463
+ }
464
+ }
465
+
466
+ function Auth_OpenID_noMathSupport ()
467
+ {
468
+ return defined ('Auth_OpenID_NO_MATH_SUPPORT ' );
469
+ }
470
+
459
471
?>
Original file line number Diff line number Diff line change @@ -194,8 +194,9 @@ function detect_math($r, &$out)
194
194
$ out .= $ r ->ol (array (
195
195
'Install the ' . $ gmp_lnk . ' PHP extension ' ,
196
196
'Install the ' . $ bc_lnk . ' PHP extension ' ,
197
- 'If your site is low-security, define ' .
198
- 'Auth_OpenID_NO_MATH_SUPPORT. The library will function, but ' .
197
+ 'If your site is low-security, call ' .
198
+ 'Auth_OpenID_setNoMathSupport(), defined in Auth/OpenID/BigMath.php. ' ,
199
+ 'The library will function, but ' .
199
200
'the security of your OpenID server will depend on the ' .
200
201
'security of the network links involved. If you are only ' .
201
202
'using consumer support, you should still be able to operate ' .
You can’t perform that action at this time.
0 commit comments