CSRF - erste Erichtigung
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
include "functions.php";
|
||||
app_require_csrf();
|
||||
include "header.php";
|
||||
include "headerline.php";
|
||||
include "nav.php";
|
||||
@@ -69,6 +70,7 @@ if(checkKaffeelisteAdmin($conn, $mailadress)){
|
||||
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>">
|
||||
<input type="hidden" name="aktion" value="bearbeitenspeichern">
|
||||
<input type="hidden" name="mitgliedID" value="<?php echo $mitgliedID; ?>">
|
||||
<?php echo app_csrf_field(); ?>
|
||||
|
||||
<label for="name">Name:</label>
|
||||
<input type="text" name="name" id="name" value="<?php echo $einzelmitglied['Name']; ?>" required>
|
||||
@@ -157,6 +159,7 @@ if(checkKaffeelisteAdmin($conn, $mailadress)){
|
||||
<!-- Formular für das Anlegen und Bearbeiten von Mitgliedern -->
|
||||
<form method="post" action="<?php # echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>">
|
||||
<input type="hidden" name="aktion" id="aktion" value="anlegen">
|
||||
<?php echo app_csrf_field(); ?>
|
||||
|
||||
<label for="name">Name:</label>
|
||||
<input type="text" name="name" id="name" required>
|
||||
@@ -210,6 +213,7 @@ if(checkKaffeelisteAdmin($conn, $mailadress)){
|
||||
echo "<form method='post' action='{$_SERVER["PHP_SELF"]}'>";
|
||||
echo "<input type='hidden' name='aktion' value='bearbeiten'>";
|
||||
echo "<input type='hidden' name='mitgliedID' value='{$row['MitarbeiterID']}'>";
|
||||
echo app_csrf_field();
|
||||
echo "<button type='submit'>Bearbeiten</button>";
|
||||
echo "</form></li><li>";
|
||||
|
||||
@@ -218,12 +222,14 @@ if(checkKaffeelisteAdmin($conn, $mailadress)){
|
||||
echo "<form method='post' action='{$_SERVER["PHP_SELF"]}'>";
|
||||
echo "<input type='hidden' name='aktion' value='deaktivieren'>";
|
||||
echo "<input type='hidden' name='mitgliedID' value='{$row['MitarbeiterID']}'>";
|
||||
echo app_csrf_field();
|
||||
echo "<button type='submit'>Deaktivieren</button>";
|
||||
echo "</form>";
|
||||
} else {
|
||||
echo "<form method='post' action='{$_SERVER["PHP_SELF"]}'>";
|
||||
echo "<input type='hidden' name='aktion' value='aktivieren'>";
|
||||
echo "<input type='hidden' name='mitgliedID' value='{$row['MitarbeiterID']}'>";
|
||||
echo app_csrf_field();
|
||||
echo "<button type='submit'>Aktivieren</button>";
|
||||
echo "</form>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user