mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-09-22 11:10:22 +00:00
Remove migration code for the aio-interface session cookie rename
The session cookie was renamed from PHPSESSID to __Host-Http-PHPSESSID in v13.0.0 and PRs #7964 and #7971 added transitional code that carried an existing PHPSESSID login over to the new cookie. Everyone has long since been migrated, so this reverts both PRs. Closes #7966 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
co-authored by
Claude Opus 5
parent
aeecdd73e0
commit
b59c80123d
@@ -8,7 +8,7 @@ use AIO\Data\DataConst;
|
||||
use \DateTime;
|
||||
|
||||
readonly class AuthManager {
|
||||
public const string SESSION_KEY = 'aio_authenticated';
|
||||
private const string SESSION_KEY = 'aio_authenticated';
|
||||
|
||||
public function __construct(
|
||||
private ConfigurationManager $configurationManager
|
||||
@@ -42,18 +42,6 @@ readonly class AuthManager {
|
||||
$_SESSION[self::SESSION_KEY] = $isLoggedIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrates the authenticated state from an old session (different cookie name) to the new session.
|
||||
* Unlike SetAuthState, this method preserves the original login timestamp and does not update
|
||||
* the session_date_file, so the session deduplicator is not triggered. This keeps the old session
|
||||
* file alive in case the response carrying the new cookie is lost (e.g., due to a 502 error during
|
||||
* a mastercontainer update), allowing the client to retry with the old cookie.
|
||||
*/
|
||||
public function MigrateAuthState(int $oldTimestamp) : void {
|
||||
$_SESSION[self::SESSION_KEY] = true;
|
||||
$_SESSION['date_time'] = $oldTimestamp;
|
||||
}
|
||||
|
||||
public function IsAuthenticated() : bool {
|
||||
return isset($_SESSION[self::SESSION_KEY]) && $_SESSION[self::SESSION_KEY] === true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user