X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FCasAuthentication%2Factions%2Fcaslogin.php;h=96e252b824c8bb1205b5ef74a52fa783b6953087;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=0e16427184b45ee03fe3d1cee6a1d4bd66694436;hpb=de55d8f83bb2ecf9461510768fe7147aec592055;p=quix0rs-gnu-social.git diff --git a/plugins/CasAuthentication/actions/caslogin.php b/plugins/CasAuthentication/actions/caslogin.php index 0e16427184..96e252b824 100644 --- a/plugins/CasAuthentication/actions/caslogin.php +++ b/plugins/CasAuthentication/actions/caslogin.php @@ -21,7 +21,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } class CasloginAction extends Action { - function handle($args) + function handle(array $args=array()) { parent::handle($args); if (common_is_real_login()) { @@ -34,19 +34,17 @@ class CasloginAction extends Action phpCAS::handleLogoutRequests(); phpCAS::forceAuthentication(); global $casTempPassword; - $casTempPassword = common_good_rand(16); + $casTempPassword = common_random_hexstr(16); $user = common_check_user(phpCAS::getUser(), $casTempPassword); if (!$user) { // TRANS: Server error displayed when trying to log in with incorrect username or password. $this->serverError(_m('Incorrect username or password.')); - return; } // success! if (!common_set_user($user)) { // TRANS: Server error displayed when login fails in CAS authentication plugin. $this->serverError(_m('Error setting user. You are probably not authorized.')); - return; } common_real_login(true);