Skip to content
Permalink
Browse files Browse the repository at this point in the history
Security: Add filter for DB port in install scripts
  • Loading branch information
ywarnier committed Jul 20, 2021
1 parent ece9eb2 commit dfae49f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main/install/ajax.php
Expand Up @@ -46,7 +46,7 @@
$dbName = null;
}

$dbPort = isset($_POST['db_port']) ? $_POST['db_port'] : 3306;
$dbPort = isset($_POST['db_port']) ? (int) $_POST['db_port'] : 3306;

$manager = connectToDatabase($dbHost, $dbUsername, $dbPass, $dbName, $dbPort);

Expand Down
1 change: 1 addition & 0 deletions main/install/index.php
Expand Up @@ -279,6 +279,7 @@
$GLOBALS[$key] = $_POST[$key];
}
}
$dbPortForm = (int) $dbPortForm;

/* NEXT STEPS IMPLEMENTATION */

Expand Down

0 comments on commit dfae49f

Please sign in to comment.