We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit b36ec6da authored by Craig Andrews's avatar Craig Andrews

Fixed incorrect disabling of login_token.

parent b07e1143
......@@ -77,12 +77,13 @@ class LoginAction extends Action
parent::handle($args);
$disabled = common_config('logincommand','disabled');
$disabled = isset($disabled) && $disabled;
if (common_is_real_login()) {
$this->clientError(_('Already logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$this->checkLogin();
} else if (!isset($disabled) && isset($args['user_id']) && isset($args['token'])){
} else if (!$disabled && isset($args['user_id']) && isset($args['token'])){
$this->checkLogin($args['user_id'],$args['token']);
} else {
common_ensure_session();
......
......@@ -584,7 +584,8 @@ class LoginCommand extends Command
function execute($channel)
{
$disabled = common_config('logincommand','disabled');
if(isset($disabled) && $disabled) {
$disabled = isset($disabled) && $disabled;
if($disabled) {
$channel->error($this->user, _('Login command is disabled'));
return;
}
......
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