CSRF zweite Anpassung

This commit is contained in:
2026-07-12 09:01:42 +02:00
parent 444f0a269b
commit 981c770ce5
6 changed files with 18 additions and 6 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
<?php
include "functions.php";
app_require_csrf();
include "header.php";
include "headerline.php";
include "nav.php";
@@ -151,9 +152,9 @@ if(checkKaffeelisteAccess($conn, $mailadress)){
echo'<ul class="actions">
<li>';
echo '<form method="post" action="' . htmlspecialchars($_SERVER["PHP_SELF"]) . '"><button type="submit">Einen Strich eintragen</button><input type="hidden" name="anzahlStriche" value="1" ></form>';
echo '<form method="post" action="' . htmlspecialchars($_SERVER["PHP_SELF"]) . '"><button type="submit">Einen Strich eintragen</button><input type="hidden" name="anzahlStriche" value="1" >' . app_csrf_field() . '</form>';
echo '</li><li>';
echo '<form method="post" action="' . htmlspecialchars($_SERVER["PHP_SELF"]) . '"><button type="submit">Zwei Striche eintragen</button><input type="hidden" name="anzahlStriche" value="2" ></form>';
echo '<form method="post" action="' . htmlspecialchars($_SERVER["PHP_SELF"]) . '"><button type="submit">Zwei Striche eintragen</button><input type="hidden" name="anzahlStriche" value="2" >' . app_csrf_field() . '</form>';
echo '</li></ul>';
if ($_SERVER["REQUEST_METHOD"] == "POST") {