1
0

Shared http/https sessions by rob richards from the forums

This commit is contained in:
Garvin Hicking
2007-02-08 12:08:43 +00:00
parent cc7cd49b22
commit 9a7632c8b7
6 changed files with 34 additions and 12 deletions

View File

@ -25,9 +25,17 @@ if (IS_installed === false) {
if (isset($serendipity['GET']['adminModule']) && $serendipity['GET']['adminModule'] == 'logout') {
serendipity_logout();
} else {
if (IS_installed === true && !serendipity_userLoggedIn()) {
// Try again to log in, this time with enabled external authentication event hook
serendipity_login(true);
if (IS_installed === true) {
/* Check author token to insure session not hijacked */
if (!isset($_SESSION['author_token']) || !isset($serendipity['COOKIE']['author_token']) ||
($_SESSION['author_token'] !== $serendipity['COOKIE']['author_token'])) {
$_SESSION['serendipityAuthedUser'] = false;
@session_destroy();
}
if (!serendipity_userLoggedIn()) {
// Try again to log in, this time with enabled external authentication event hook
serendipity_login(true);
}
}
}