Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@
$c->query('UserHooks')->register();

// URL params and redirect_url cookie
setcookie("user_cas_enforce_authentication", "0", null, '/');
setcookie("user_cas_enforce_authentication", "0", 0, '/');
$urlParams = '';

if (isset($_REQUEST['redirect_url'])) {

$urlParams = $_REQUEST['redirect_url'];
// Save the redirect_rul to a cookie
$cookie = setcookie("user_cas_redirect_url", "$urlParams", null, '/');
$cookie = setcookie("user_cas_redirect_url", "$urlParams", 0, '/');
}/*
else {

setcookie("user_cas_redirect_url", '/', null, '/');
setcookie("user_cas_redirect_url", '/', 0, '/');
}*/

// Register alternative LogIn
Expand All @@ -88,7 +88,7 @@
$loggingService = $c->query("LoggingService");

$loggingService->write(LoggingService::DEBUG, 'Enforce Authentication was: ' . $isEnforced);
setcookie("user_cas_enforce_authentication", '1', null, '/');
setcookie("user_cas_enforce_authentication", '1', 0, '/');

// Initialize app
if (!$appService->isCasInitialized()) {
Expand All @@ -101,7 +101,7 @@

$loggingService->write(LoggingService::DEBUG, 'Enforce Authentication was on and phpCAS is not authenticated. Redirecting to CAS Server.');

$cookie = setcookie("user_cas_redirect_url", urlencode($requestUri), null, '/');
$cookie = setcookie("user_cas_redirect_url", urlencode($requestUri), 0, '/');

header("Location: " . $appService->linkToRouteAbsolute($c->getAppName() . '.authentication.casLogin'));
die();
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/AuthenticationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function casLogin()
$this->loggingService->write(\OCA\UserCas\Service\LoggingService::DEBUG, "phpCAS user has been authenticated against owncloud.");

# Reset cookie
setcookie("user_cas_redirect_url", '/', null, '/');
setcookie("user_cas_redirect_url", '/', 0, '/');

return new RedirectResponse($location);
} else { # Not authenticated against owncloud
Expand All @@ -191,7 +191,7 @@ public function casLogin()
$this->loggingService->write(\OCA\UserCas\Service\LoggingService::DEBUG, "phpCAS user is already authenticated against owncloud.");

# Reset cookie
setcookie("user_cas_redirect_url", '/', null, '/');
setcookie("user_cas_redirect_url", '/', 0, '/');

return new RedirectResponse($location);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hooks/UserHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public function postLogout()
$this->loggingService->write(\OCA\UserCas\Service\LoggingService::DEBUG, 'phpCAS logging out.');

# Reset cookie
setcookie("user_cas_redirect_url", '/', null, '/');
setcookie("user_cas_redirect_url", '/', 0, '/');

\phpCAS::logout(array("service" => $this->appService->getAbsoluteURL('/')));

Expand Down