update composer-dependencies; add connection-test to Mysqls.update() when changing passwords; validate ssl-certificates to avoid private/public key mismatch and a failed webserver start, fixes #778

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-12-31 09:23:28 +01:00
parent 1c17df69d2
commit 1eb14d7564
3 changed files with 242 additions and 174 deletions

View File

@@ -113,15 +113,24 @@ class MysqlsTest extends TestCase
{
global $admin_userdata;
$newPwd = \Froxlor\System\Crypt::generatePassword();
$data = [
'dbname' => 'test1sql1',
'mysql_password' => \Froxlor\System\Crypt::generatePassword(),
'mysql_password' => $newPwd,
'description' => 'testdb-upd',
'loginname' => 'test1'
];
$json_result = Mysqls::getLocal($admin_userdata, $data)->update();
$result = json_decode($json_result, true)['data'];
$this->assertEquals('testdb-upd', $result['description']);
// test connection
try {
$test_conn = new \PDO("mysql:host=localhost", 'test1sql1', $newPwd);
unset($test_conn);
} catch (PDOException $e) {
$this->fail($e->getMessage());
}
}
/**