wrong mode in index.php now gives a 404 error (#15); anti cross-site-request token
This commit is contained in:
parent
186d770741
commit
ab0ac45415
4 changed files with 48 additions and 1 deletions
|
|
@ -12,7 +12,11 @@
|
|||
<!--input modus: words-->
|
||||
<div id="inpWords" class="inpSection">
|
||||
<h2>Input words</h2>
|
||||
<?php if (empty($_SESSION['csrf_token'])) {
|
||||
$_SESSION['csrf_token'] = bin2hex(random_bytes(16));
|
||||
} ?>
|
||||
<form id="form1" action="index.php?mode=display" method="post">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<?php for ($i = 1; $i <= MAX_WORDS; $i++) : ?>
|
||||
<?php $nr = sprintf("%02d", $i); ?>
|
||||
<div class="inp">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue