Skip to content

fix: add CSRF token output to install wizard#763

Open
anonymoususer72041 wants to merge 1 commit intoopencats:masterfrom
anonymoususer72041:fix/install-wizard-csrf-token
Open

fix: add CSRF token output to install wizard#763
anonymoususer72041 wants to merge 1 commit intoopencats:masterfrom
anonymoususer72041:fix/install-wizard-csrf-token

Conversation

@anonymoususer72041
Copy link
Copy Markdown
Contributor

When the install wizard is opened while an authenticated OpenCATS session is still active, its initial AJAX request can fail with "-1 Invalid request." because ajax.php enforces CSRF validation for logged-in sessions, but installwizard.php did not expose CATSCsrfToken for js/lib.js to append to the request.

This change starts the existing OpenCATS session before any HTML output in installwizard.php, loads the required session and template classes and outputs CATSCsrfToken when an authenticated session is present.

The CSRF validation in ajax.php remains unchanged. Logged-out install wizard access continues to behave as before, while logged-in sessions now provide the token needed for installer AJAX requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant