injClean inputs

This commit is contained in:
Matt Pass
2016-08-25 17:02:39 +01:00
parent 667417262c
commit a0e48b5088

View File

@@ -77,7 +77,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Add the new one
if ($_POST['githubLocalPathNEW'] != "" && $_POST['githubRemotePathNEW'] != "") {
$settingsNew .= '"'.xssClean($_POST['githubLocalPathNEW'],"html").'",';
$settingsNew .= '"'.injClean(xssClean($_POST['githubLocalPathNEW'],"html")).'",';
}
// Then set all the old local paths
@@ -93,7 +93,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Add the new one
if ($_POST['githubLocalPathNEW'] != "" && $_POST['githubRemotePathNEW'] != "") {
$settingsNew .= '"'.xssClean($_POST['githubRemotePathNEW'],"html").'",';
$settingsNew .= '"'.injClean(xssClean($_POST['githubRemotePathNEW'],"html")).'",';
}
// Then set all the old remote paths
@@ -118,7 +118,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 .= '"'.xssClean($_POST['githubLocalPath'.$i],"html").'",';
$settingsNew .= '"'.injClean(xssClean($_POST['githubLocalPath'.$i],"html")).'",';
}
}
// Rtrim off the last comma
@@ -131,7 +131,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 .= '"'.xssClean($_POST['githubRemotePath'.$i],"html").'",';
$settingsNew .= '"'.injClean(xssClean($_POST['githubRemotePath'.$i],"html")).'",';
}
}
// Rtrim off the last comma