Fix vulnerability

This commit is contained in:
Jose Gonzalez 2020-11-17 14:49:26 +01:00
parent 9bfdfa87f6
commit e0404d565a
1 changed files with 6 additions and 0 deletions

View File

@ -336,6 +336,12 @@ class HostDevices extends Wizard
)
)
);
// Forbidden chars cleaning.
foreach ($network as $key => $singleNetwork) {
$network[$key] = preg_replace('/[A-Za-z-()\']/', '', $singleNetwork);
}
unlink($_FILES['network_csv']['tmp_name']);
if (empty($network) || is_array($network) === false) {
$this->msg = __(