xssClean $_POST vars

This commit is contained in:
Matt Pass
2014-06-27 08:52:26 +01:00
parent 8509a62f06
commit 4803eb2bac

View File

@@ -72,7 +72,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Add the new one
if ($_POST['githubLocalPathNEW'] != "" && $_POST['githubRemotePathNEW'] != "") {
$settingsNew .= '"'.$_POST['githubLocalPathNEW'].'",';
$settingsNew .= '"'.xssClean($_POST['githubLocalPathNEW'],"html").'",';
}
// Then set all the old local paths
@@ -88,7 +88,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Add the new one
if ($_POST['githubLocalPathNEW'] != "" && $_POST['githubRemotePathNEW'] != "") {
$settingsNew .= '"'.$_POST['githubRemotePathNEW'].'",';
$settingsNew .= '"'.xssClean($_POST['githubRemotePathNEW'],"html").'",';
}
// Then set all the old remote paths
@@ -113,7 +113,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Redo the arrays using the form data
for ($i=0; $i<count($oldLocal); $i++) {
if ($_POST['githubLocalPath'.$i] != "") {
$settingsNew .= '"'.$_POST['githubLocalPath'.$i].'",';
$settingsNew .= '"'.xssClean($_POST['githubLocalPath'.$i],"html").'",';
}
}
// Rtrim off the last comma
@@ -126,7 +126,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Redo the arrays using the form data
for ($i=0; $i<count($oldRemote); $i++) {
if ($_POST['githubRemotePath'.$i] != "") {
$settingsNew .= '"'.$_POST['githubRemotePath'.$i].'",';
$settingsNew .= '"'.xssClean($_POST['githubRemotePath'.$i],"html").'",';
}
}
// Rtrim off the last comma