Skip to content

Commit 84c2d48

Browse files
committed
CAS: Use $_POST instead of $_REQUEST BT#18252
Add checkLoginCas $_GET parameter in order to check if user is already logged in.
1 parent 2b0c65b commit 84c2d48

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

main/inc/local.inc.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
$logging_in = false;
199199

200200
/* MAIN CODE */
201-
if (array_key_exists('forceCASAuthentication', $_REQUEST)) {
201+
if (array_key_exists('forceCASAuthentication', $_POST)) {
202202
unset($_SESSION['_user']);
203203
unset($_user);
204204
if (api_is_anonymous()) {
@@ -283,13 +283,14 @@
283283
if (
284284
is_array($cas) && array_key_exists('force_redirect', $cas) && $cas['force_redirect']
285285
||
286-
array_key_exists('forceCASAuthentication', $_REQUEST)
286+
array_key_exists('forceCASAuthentication', $_POST)
287+
||
288+
array_key_exists('checkLoginCas', $_GET)
287289
||
288290
array_key_exists('ticket', $_GET)
289291
) {
290292
phpCAS::forceAuthentication();
291293
}
292-
293294
// check whether we are authenticated
294295
if (phpCAS::isAuthenticated()) {
295296
// the user was successfully authenticated by the CAS server, read its CAS user identification

0 commit comments

Comments
 (0)