fix: navigateTo undefined + CSRF-Cookie Secure-Flag
- router.js: navigateTo() existierte nicht → ReferenceError nach fehlgeschlagenem auth.me(). Ersetzt durch navigate() + currentPath-Reset damit die Weiterleitung nicht durch den currentPath-Guard geblockt wird. - csrf.js: SESSION_SECURE=false wurde nicht berücksichtigt → CSRF-Cookie war über HTTP nicht für JS lesbar → alle schreibenden API-Calls nach Login scheiterten mit 403. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-2
@@ -62,13 +62,15 @@ async function navigate(path, pushState = true) {
|
||||
const result = await auth.me();
|
||||
currentUser = result.user;
|
||||
} catch {
|
||||
navigateTo('/login', true);
|
||||
currentPath = null; // Reset damit navigate('/login') nicht geblockt wird
|
||||
navigate('/login');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!route.requiresAuth && currentUser && path === '/login') {
|
||||
navigateTo('/', true);
|
||||
currentPath = null;
|
||||
navigate('/');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user