forked from GNUsocial/gnu-social
move check for SSL from util.php to OpenIDPlugin
This commit is contained in:
parent
797f296974
commit
0616ea0205
@ -735,8 +735,7 @@ function common_local_url($action, $args=null, $params=null, $fragment=null)
|
||||
function common_is_sensitive($action)
|
||||
{
|
||||
static $sensitive = array('login', 'register', 'passwordsettings',
|
||||
'twittersettings', 'finishopenidlogin',
|
||||
'finishaddopenid', 'api');
|
||||
'twittersettings', 'api');
|
||||
$ssl = null;
|
||||
|
||||
if (Event::handle('SensitiveAction', array($action, &$ssl))) {
|
||||
|
@ -119,4 +119,17 @@ class OpenIDPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onSensitiveAction($action, &$ssl)
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
case 'finishopenidlogin':
|
||||
case 'finishaddopenid':
|
||||
$ssl = true;
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user