Guard against emtpy referrers

This commit is contained in:
aymm 2021-03-09 19:32:04 +00:00
parent 6f390be2bf
commit d1194b57a0

View File

@ -321,8 +321,10 @@ class APnutI
$this->logger->info(
"Checking auth status for app: {$this->app_name}: {$log_str}"
);
if (isset($_SERVER['HTTP_REFERER'])) {
$this->logger->info('Referrer: '.($_SERVER['HTTP_REFERER'] ?? 'Unknown'));
$_SESSION[$this->token_redirect_after_auth] = $_SERVER['HTTP_REFERER'];
}
return $is_authenticated;
}