Skip to content

Instantly share code, notes, and snippets.

Avatar

Apurva Gupta apurvagupta

View GitHub Profile
View xss.php
Solutions:
//Solution #1 : Validation Code snippet:
<?php if (preg_match('/^[ A-Za-z0-9_@.#&-]*$/', $_GET['query'])) { ?>
<div class="column prepend-1 span-24 first last">
<h2>Pictures that are tagged as '<?= $_GET['query'] ?>'</h2>
<?php thumbnail_pic_list($pictures); ?>
</div>