mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Escape client input, console output etc. before doing any echo.
Signed-off-by: D9ping <D9ping@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ include_once('../../includes/functions.php');
|
||||
|
||||
if(isset($_POST['interface']) && isset($_POST['csrf_token']) && CSRFValidate()) {
|
||||
$int = $_POST['interface'];
|
||||
// FIXME slashes and other forbidden filename characters not stripped. [security]
|
||||
if(!file_exists(RASPI_CONFIG_NETWORKING.'/'.$int.'.ini')) {
|
||||
touch(RASPI_CONFIG_NETWORKING.'/'.$int.'.ini');
|
||||
}
|
||||
@@ -21,4 +22,3 @@ if(isset($_POST['interface']) && isset($_POST['csrf_token']) && CSRFValidate())
|
||||
echo json_encode($jsonData);
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user