challenge.php
xss-redirects.md
PHP
Injection & input
Difficulty 1/3
1
<?php
2
// profile.php
3
$name = $_GET[
'name'
] ??
'guest'
;
4
$next = $_GET[
'next'
] ??
'/home'
;
5
6
echo
"<h1>Welcome back, $name</h1>"
;
7
echo
'<a href="'
. $next .
'">Continue</a>'
;