Skip to content

Commit

Permalink
security: Security Patch to deal with reported vulnerabilties (#7164)
Browse files Browse the repository at this point in the history
* WIP: Security Patch

* Update install.php

Styling fix

* Update install.php

* Update dbFacile.php

* Fix whitespace
  • Loading branch information
f0o authored and laf committed Aug 18, 2017
1 parent 3ed5aca commit d3094fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions html/install.php
Expand Up @@ -2,7 +2,7 @@
session_start();
if (empty($_POST) && !empty($_SESSION) && !isset($_REQUEST['stage'])) {
$_POST = $_SESSION;
} else {
} elseif (!file_exists("../config.php")) {
$_SESSION = array_replace($_SESSION, $_POST);
}

Expand Down Expand Up @@ -52,7 +52,9 @@
// Check we can connect to MySQL DB, if not, back to stage 1 :)
if ($stage > 1) {
try {
dbConnect();
if ($stage != 6) {
dbConnect();
}
if ($stage == 2 && $_SESSION['build-ok'] == true) {
$stage = 3;
$msg = "It appears that the database is already setup so have moved onto stage $stage";
Expand Down
1 change: 1 addition & 0 deletions includes/dbFacile.php
Expand Up @@ -58,6 +58,7 @@ function dbConnect($host = null, $user = '', $password = '', $database = '', $po
$socket = empty($socket) ? $config['db_socket'] : $socket;

$database_link = mysqli_connect('p:' . $host, $user, $password, null, $port, $socket);
mysqli_options($database_link, MYSQLI_OPT_LOCAL_INFILE, false);
if ($database_link === false) {
$error = mysqli_connect_error();
if ($error == 'No such file or directory') {
Expand Down

0 comments on commit d3094fa

Please sign in to comment.