]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Test if $casSettings['user_whitelist'] is an array - and then perform in_array(....
authormmn <mmn@hethane.se>
Sun, 17 Dec 2017 17:37:24 +0000 (17:37 +0000)
committermmn <mmn@hethane.se>
Sun, 17 Dec 2017 17:37:24 +0000 (17:37 +0000)
plugins/CasAuthentication/actions/caslogin.php

index 9250b43b7a91cf720e8daea42e557ff16cb86395..468718b4c9d2ae0df77a6ce16009b6c453618cc3 100644 (file)
@@ -41,7 +41,7 @@ class CasloginAction extends Action
                 $this->serverError(_m('Incorrect username or password.'));
             }
 
-            if ($casSettings['user_whitelist'] != null && !in_array($user->nickname, $casSettings['user_whitelist'])) {
+            if (is_array($casSettings['user_whitelist']) && !in_array($user->nickname, $casSettings['user_whitelist'])) {
                 // TRANS: Server error displayed when trying to log in with non-whitelisted user name (when whitelists are enabled.)
                 $this->serverError(_m('Incorrect username or password.'));
             }