GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit 0616ea02 authored by Evan Prodromou's avatar Evan Prodromou

move check for SSL from util.php to OpenIDPlugin

parent 797f2969
......@@ -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;
}
}
}
\ No newline at end of file
function onSensitiveAction($action, &$ssl)
{
switch ($action)
{
case 'finishopenidlogin':
case 'finishaddopenid':
$ssl = true;
return false;
default:
return true;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment