Permalink
Browse files

Throw error when testing DB connection with empty password

  • Loading branch information...
1 parent 9271af6 commit b723e91240a046ee47bae77c8cc187f32b26a96f @cdujeu cdujeu committed Sep 3, 2016
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/src/plugins/boot.conf/BootConfLoader.php
@@ -25,6 +25,7 @@
use DOMXPath;
use Exception;
use Pydio\Access\Core\Model\Repository;
+use Pydio\Core\Exception\PydioException;
use Pydio\Core\Model\Context;
use Pydio\Core\Model\ContextInterface;
use Pydio\Core\Services\AuthService;
@@ -475,7 +476,9 @@ public function testConnexions($action, $httpVars, $fileVars, ContextInterface $
mkdir(dirname($dbFile), 0755, true);
}
}
-
+ if(empty($p["password"])){
+ throw new PydioException("Although it's technically possible, for security reasons please do not use blank password for your DB connection.");
+ }
// Should throw an exception if there was a problem.
dibi::connect($p);
dibi::disconnect();

0 comments on commit b723e91

Please sign in to comment.