Merge branch 'phpservermon:develop' into fix/DBUserDetailRetention-LDAP
commit
c81a4a426c
|
@ -86,20 +86,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mnsami/composer-custom-directory-installer",
|
"name": "mnsami/composer-custom-directory-installer",
|
||||||
"version": "1.1.1",
|
"version": "2.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mnsami/composer-custom-directory-installer.git",
|
"url": "https://github.com/mnsami/composer-custom-directory-installer.git",
|
||||||
"reference": "8cc82e0c5801cc3bf53ba452afdcaa5c6ff645a5"
|
"reference": "85f66323978d0b1cb0e6acc7f69b3e7b912f82d9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/mnsami/composer-custom-directory-installer/zipball/8cc82e0c5801cc3bf53ba452afdcaa5c6ff645a5",
|
"url": "https://api.github.com/repos/mnsami/composer-custom-directory-installer/zipball/85f66323978d0b1cb0e6acc7f69b3e7b912f82d9",
|
||||||
"reference": "8cc82e0c5801cc3bf53ba452afdcaa5c6ff645a5",
|
"reference": "85f66323978d0b1cb0e6acc7f69b3e7b912f82d9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"composer-plugin-api": "^1.0",
|
"composer-plugin-api": "^1.0 || ^2.0",
|
||||||
"php": ">=5.3"
|
"php": ">=5.3"
|
||||||
},
|
},
|
||||||
"type": "composer-plugin",
|
"type": "composer-plugin",
|
||||||
|
@ -136,9 +136,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/mnsami/composer-custom-directory-installer/issues",
|
"issues": "https://github.com/mnsami/composer-custom-directory-installer/issues",
|
||||||
"source": "https://github.com/mnsami/composer-custom-directory-installer/tree/master"
|
"source": "https://github.com/mnsami/composer-custom-directory-installer/tree/2.0.0"
|
||||||
},
|
},
|
||||||
"time": "2016-05-25T08:26:02+00:00"
|
"time": "2020-08-18T11:00:11+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "paragonie/random_compat",
|
"name": "paragonie/random_compat",
|
||||||
|
@ -1023,20 +1023,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "viharm/php-db-auth",
|
"name": "viharm/php-db-auth",
|
||||||
"version": "v2.7.0",
|
"version": "v2.7.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://bitbucket.org/viharm/phpdbauth.git",
|
"url": "https://bitbucket.org/viharm/phpdbauth.git",
|
||||||
"reference": "60c1b0a28d26178d5e4960d49185af85734643c6"
|
"reference": "27ea793aae007d0d222650311f2af9a1f88865b3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://bitbucket.org/viharm/phpdbauth/get/60c1b0a28d26178d5e4960d49185af85734643c6.zip",
|
"url": "https://bitbucket.org/viharm/phpdbauth/get/27ea793aae007d0d222650311f2af9a1f88865b3.zip",
|
||||||
"reference": "60c1b0a28d26178d5e4960d49185af85734643c6",
|
"reference": "27ea793aae007d0d222650311f2af9a1f88865b3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"mnsami/composer-custom-directory-installer": "1.1.*",
|
"mnsami/composer-custom-directory-installer": "^2.0.0",
|
||||||
"php": ">=5.3.0",
|
"php": ">=5.3.0",
|
||||||
"viharm/php-khelper": "^1.4.1"
|
"viharm/php-khelper": "^1.4.1"
|
||||||
},
|
},
|
||||||
|
@ -1069,9 +1069,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://bitbucket.org/viharm/phpdbauth/issues",
|
"issues": "https://bitbucket.org/viharm/phpdbauth/issues",
|
||||||
"source": "https://bitbucket.org/viharm/phpdbauth/src/60c1b0a28d26178d5e4960d49185af85734643c6/?at=master"
|
"source": "https://bitbucket.org/viharm/phpdbauth/src/27ea793aae007d0d222650311f2af9a1f88865b3/?at=v2.7.1"
|
||||||
},
|
},
|
||||||
"time": "2020-01-05T11:48:12+00:00"
|
"time": "2022-03-13T23:01:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "viharm/php-khelper",
|
"name": "viharm/php-khelper",
|
||||||
|
@ -1114,20 +1114,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "viharm/php-ldap-auth",
|
"name": "viharm/php-ldap-auth",
|
||||||
"version": "v2.5.1",
|
"version": "v2.5.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://bitbucket.org/viharm/phpldapauth.git",
|
"url": "https://bitbucket.org/viharm/phpldapauth.git",
|
||||||
"reference": "3a60e626bfb63eda786dad30f09bd75fd5172cb1"
|
"reference": "260c158ebbd0ae5069dc30e2a840c8541ed2ad24"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://bitbucket.org/viharm/phpldapauth/get/3a60e626bfb63eda786dad30f09bd75fd5172cb1.zip",
|
"url": "https://bitbucket.org/viharm/phpldapauth/get/260c158ebbd0ae5069dc30e2a840c8541ed2ad24.zip",
|
||||||
"reference": "3a60e626bfb63eda786dad30f09bd75fd5172cb1",
|
"reference": "260c158ebbd0ae5069dc30e2a840c8541ed2ad24",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"mnsami/composer-custom-directory-installer": "1.1.*",
|
"mnsami/composer-custom-directory-installer": "^2.0.0",
|
||||||
"php": ">=5.3.0",
|
"php": ">=5.3.0",
|
||||||
"viharm/php-khelper": "^1.4.1"
|
"viharm/php-khelper": "^1.4.1"
|
||||||
},
|
},
|
||||||
|
@ -1162,28 +1162,28 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://bitbucket.org/viharm/phpldapauth/issues",
|
"issues": "https://bitbucket.org/viharm/phpldapauth/issues",
|
||||||
"source": "https://bitbucket.org/viharm/phpldapauth/src/3a60e626bfb63eda786dad30f09bd75fd5172cb1/?at=v2.5.1"
|
"source": "https://bitbucket.org/viharm/phpldapauth/src/260c158ebbd0ae5069dc30e2a840c8541ed2ad24/?at=v2.5.2"
|
||||||
},
|
},
|
||||||
"time": "2020-11-24T21:56:47+00:00"
|
"time": "2022-03-13T23:14:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "viharm/psm-ldap-auth",
|
"name": "viharm/psm-ldap-auth",
|
||||||
"version": "v1.1.3",
|
"version": "v1.1.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitlab.com/viharm/PsmLDAPauth.git",
|
"url": "https://gitlab.com/viharm/PsmLDAPauth.git",
|
||||||
"reference": "1addeb0403a19e457f2c622a67156f52568da308"
|
"reference": "7c84d7ba6b23e9ea226be671f74f48fec62bed73"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://gitlab.com/api/v4/projects/viharm%2FPsmLDAPauth/repository/archive.zip?sha=1addeb0403a19e457f2c622a67156f52568da308",
|
"url": "https://gitlab.com/api/v4/projects/viharm%2FPsmLDAPauth/repository/archive.zip?sha=7c84d7ba6b23e9ea226be671f74f48fec62bed73",
|
||||||
"reference": "1addeb0403a19e457f2c622a67156f52568da308",
|
"reference": "7c84d7ba6b23e9ea226be671f74f48fec62bed73",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0",
|
"php": ">=5.3.0",
|
||||||
"viharm/php-db-auth": "^2.6.0",
|
"viharm/php-db-auth": "^2.6.0",
|
||||||
"viharm/php-ldap-auth": "^2.4.0"
|
"viharm/php-ldap-auth": "^2.5.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
@ -1210,9 +1210,10 @@
|
||||||
"psm"
|
"psm"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://gitlab.com/viharm/PsmLDAPauth/issues"
|
"issues": "https://gitlab.com/viharm/PsmLDAPauth/issues",
|
||||||
|
"source": "https://gitlab.com/viharm/PsmLDAPauth/-/tree/v1.1.4"
|
||||||
},
|
},
|
||||||
"time": "2020-11-24T22:57:57+00:00"
|
"time": "2022-03-13T19:46:17+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
@ -1231,5 +1232,5 @@
|
||||||
"ext-xml": "*"
|
"ext-xml": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.0.0"
|
"plugin-api-version": "2.2.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ $sm_lang = array(
|
||||||
'website_password_description' => 'Password to access the site. The password is encrypted in the database.',
|
'website_password_description' => 'Password to access the site. The password is encrypted in the database.',
|
||||||
'fieldset_monitoring' => 'Monitoring',
|
'fieldset_monitoring' => 'Monitoring',
|
||||||
'fieldset_permissions' => 'Permissions',
|
'fieldset_permissions' => 'Permissions',
|
||||||
'permissions' => 'Server will be visible for the following users',
|
'permissions' => 'Users who can view and be notified about this server',
|
||||||
'port' => 'Port',
|
'port' => 'Port',
|
||||||
'custom_port' => 'Custom Port',
|
'custom_port' => 'Custom Port',
|
||||||
'popular_ports' => 'Popular Ports',
|
'popular_ports' => 'Popular Ports',
|
||||||
|
|
|
@ -533,16 +533,29 @@ class Database
|
||||||
*/
|
*/
|
||||||
protected function connect()
|
protected function connect()
|
||||||
{
|
{
|
||||||
|
$isHostUnixSocket = strpos($this->db_host, ':') === 0;
|
||||||
|
|
||||||
// Initizale connection
|
// Initizale connection
|
||||||
try {
|
try {
|
||||||
$this->pdo = new \PDO(
|
if ($isHostUnixSocket) {
|
||||||
'mysql:host=' . $this->db_host .
|
$this->pdo = new \PDO(
|
||||||
';port=' . $this->db_port .
|
'mysql:unix_socket=' . ltrim($this->db_host, ':') .
|
||||||
';dbname=' . $this->db_name .
|
';dbname=' . $this->db_name .
|
||||||
';charset=utf8',
|
';charset=utf8',
|
||||||
$this->db_user,
|
$this->db_user,
|
||||||
$this->db_pass
|
$this->db_pass
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
$this->pdo = new \PDO(
|
||||||
|
'mysql:host=' . $this->db_host .
|
||||||
|
';port=' . $this->db_port .
|
||||||
|
';dbname=' . $this->db_name .
|
||||||
|
';charset=utf8',
|
||||||
|
$this->db_user,
|
||||||
|
$this->db_pass
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
|
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
|
||||||
$this->status = true;
|
$this->status = true;
|
||||||
} catch (\PDOException $e) {
|
} catch (\PDOException $e) {
|
||||||
|
|
Loading…
Reference in New Issue