mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 10:49:23 +02:00
patch XSS vulnerability (#358)
the powergamers page was vulnerable to XSS/javascript injection, this should fix it. XSS screenshot: https://i.imgur.com/4rJuWqY.png XSS POC: <form action="https://<censored>/powergamers.php" method="POST"> <input type="hidden" name="days[]" value="3" /> <input type="hidden" name="days[]" value="1<script>alert("XSS running!");</script>" /> <input type="submit" value="click here to start xss" /> </form>
This commit is contained in:
parent
c0fe9e5d85
commit
d9cd81508b
@ -15,8 +15,8 @@ include 'layout/overall/footer.php';
|
||||
$today = true;
|
||||
if ($days) {
|
||||
$selected = ($_POST['days']);
|
||||
$days = $selected[1];
|
||||
$vocation = $selected[0];
|
||||
$days = (int) $selected[1];
|
||||
$vocation = (int) $selected[0];
|
||||
if ($days > 0)
|
||||
$today = false;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user