security: faza 4 - ochrona CSRF panelu administracyjnego
- Nowa klasa \Shared\Security\CsrfToken (generate/validate/regenerate) - Token CSRF we wszystkich formularzach edycji (form-edit.php) - Walidacja CSRF w FormRequestHandler::handleSubmit() - Token CSRF w formularzu logowania i formularzach 2FA - Walidacja CSRF w App::special_actions() dla żądań POST - Regeneracja tokenu po udanym logowaniu (bezpośrednia i przez 2FA) - Fix XSS: htmlspecialchars na $alert w unlogged-layout.php - 7 nowych testów CsrfTokenTest (817 testów łącznie) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,12 +37,13 @@
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<i class="icon fa fa-ban "></i><?= $alert;?>
|
||||
<i class="icon fa fa-ban "></i><?= htmlspecialchars($alert) ?>
|
||||
</div>
|
||||
<? endif;
|
||||
?>
|
||||
<form method="POST" action="/admin/" class="form-horizontal" rol="form">
|
||||
<input type="hidden" name="s-action" value="user-logon" />
|
||||
<input type="hidden" name="_csrf_token" value="<?= htmlspecialchars(\Shared\Security\CsrfToken::getToken()) ?>">
|
||||
<div class="form-group form-inline row">
|
||||
<div class="col-12">
|
||||
<div class="input-group input-login">
|
||||
|
||||
Reference in New Issue
Block a user