Initial import of fitme3070.pt platform

Plain-PHP fleet platform with id.andmore.pt SSO. Wires shared/platform-tools
as a submodule (platform_update, backups, git/migration tools) like the other
platforms.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
andreandClaude Opus 4.8 committed 2026-06-12 10:44:58 +01:00
commit e68d357177
2330 files changed
+215968

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
require __DIR__ . '/../../config/db.php';
require __DIR__ . '/../../config/functions.php';
// Always clear the local session first.
$_SESSION = [];
session_destroy();
// Federated mode: always bounce through Andmore ID's logout endpoint so both
// the central sso_sessions row and the am_sso cookie are destroyed AND
// id.andmore.pt's own PHP session is cleared. The old check for the am_sso
// cookie was a bug: if the cookie happened to be absent from $_COOKIE (e.g.
// due to a Secure-flag or SameSite edge case), the central logout was skipped,
// leaving id.andmore.pt's session alive. That session then caused a redirect
// loop — id.andmore.pt auto-logged the user in and bounced them back to the
// login stub, which immediately bounced them back to id.andmore.pt, ad inf.
//
// Return to the public landing page (not the login stub) so the post-logout
// redirect from id.andmore.pt lands on a real page and the chain stops.
if (identity_is_federated()) {
header('Location: ' . ANDMORE_ID_URL . 'auth/logout.php?return_to=' . urlencode(APP_BASE_URL));
exit;
}
header('Location: ' . base_url('views/auth/login.php'));
exit;