Merge pull request #1046 from virtualtam/security/login-xss

Fix XSS vulnerability
This commit is contained in:
VirtualTam 2018-01-04 18:04:34 +01:00 committed by GitHub
commit 17dee65651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {