Compare commits
2 Commits
4b5d0dd704
...
3bdb2b0a6a
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bdb2b0a6a | |||
| 34898059d9 |
@ -73,12 +73,17 @@ echo "<h3>List of notes/comments</h3>";
|
|||||||
|
|
||||||
if (!empty($result) && $result->num_rows >= 1) {
|
if (!empty($result) && $result->num_rows >= 1) {
|
||||||
while ($row = $result -> fetch_assoc()) {
|
while ($row = $result -> fetch_assoc()) {
|
||||||
|
// Escape output to prevent stored XSS (DB content must be treated as untrusted).
|
||||||
|
$safe_note = htmlspecialchars($row["note"], ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8");
|
||||||
|
$safe_user = htmlspecialchars($row["username"], ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8");
|
||||||
|
|
||||||
echo "<div class='note'>";
|
echo "<div class='note'>";
|
||||||
echo "<div class='note-content'>" . $row["note"] . "</div>";
|
echo "<div class='note-content'>" . $safe_note . "</div>";
|
||||||
echo "<div class='note-signature'> by " . $row["username"] . "</div>";
|
echo "<div class='note-signature'> by " . $safe_user . "</div>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Free result set
|
// Free result set
|
||||||
$result -> free_result();
|
$result -> free_result();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
3
passman-dev/php/passman/xss/stolencookies.txt
Normal file
3
passman-dev/php/passman/xss/stolencookies.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
PHPSESSID=2c215dd41fe1090a5da5d0f3adc6ba64
|
||||||
|
PHPSESSID=2c215dd41fe1090a5da5d0f3adc6ba64
|
||||||
@ -1,2 +0,0 @@
|
|||||||
PHPSESSID=knjfug3u4gavdas9o4eupe38l1; seclab_user=u1
|
|
||||||
seclab_user=u1; PHPSESSID=o1mg400lipd2mck69kpfnl6p5s
|
|
||||||
Loading…
x
Reference in New Issue
Block a user