Fix XSS vulnerability

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2018-01-04 15:53:48 +01:00
parent b6b53143fc
commit 65c002ca18

View file

@ -436,7 +436,7 @@ function ban_canLogin($conf)
else else
{ {
ban_loginFailed($conf); ban_loginFailed($conf);
$redir = '&username='. $_POST['login']; $redir = '&username='. urlencode($_POST['login']);
if (isset($_GET['post'])) { if (isset($_GET['post'])) {
$redir .= '&post=' . urlencode($_GET['post']); $redir .= '&post=' . urlencode($_GET['post']);
foreach (array('description', 'source', 'title', 'tags') as $param) { foreach (array('description', 'source', 'title', 'tags') as $param) {