Compare commits
No commits in common. "3bdb2b0a6a1302ce5bd65b8084aea03567d29132" and "f94a1ebbd551e917e5a7c968fe97446466a9599b" have entirely different histories.
3bdb2b0a6a
...
f94a1ebbd5
@ -72,17 +72,12 @@ $result = $conn->query($sql_query);
|
|||||||
echo "<h3>List of notes/comments</h3>";
|
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).
|
echo "<div class='note'>";
|
||||||
$safe_note = htmlspecialchars($row["note"], ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8");
|
echo "<div class='note-content'>" . $row["note"] . "</div>";
|
||||||
$safe_user = htmlspecialchars($row["username"], ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8");
|
echo "<div class='note-signature'> by " . $row["username"] . "</div>";
|
||||||
|
echo "</div>";
|
||||||
echo "<div class='note'>";
|
}
|
||||||
echo "<div class='note-content'>" . $safe_note . "</div>";
|
|
||||||
echo "<div class='note-signature'> by " . $safe_user . "</div>";
|
|
||||||
echo "</div>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Free result set
|
// Free result set
|
||||||
$result -> free_result();
|
$result -> free_result();
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
PHPSESSID=2c215dd41fe1090a5da5d0f3adc6ba64
|
|
||||||
PHPSESSID=2c215dd41fe1090a5da5d0f3adc6ba64
|
|
||||||
2
passman-dev/php/xss/stolencookies.txt
Normal file
2
passman-dev/php/xss/stolencookies.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
PHPSESSID=knjfug3u4gavdas9o4eupe38l1; seclab_user=u1
|
||||||
|
seclab_user=u1; PHPSESSID=o1mg400lipd2mck69kpfnl6p5s
|
||||||
Loading…
x
Reference in New Issue
Block a user