You've already forked phpmyadmin
mirror of
https://github.com/phpmyadmin/phpmyadmin.git
synced 2026-10-28 07:41:55 +03:00
Remove the nopasswd setting
It does nothing since removal of related feature in
53f541af86.
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
@@ -577,6 +577,10 @@ Server connection settings
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
.. deprecated:: 4.7.0
|
||||
|
||||
This setting was removed as it can produce unexpected results.
|
||||
|
||||
Allow attempt to log in without password when a login with password
|
||||
fails. This can be used together with http authentication, when
|
||||
authentication is done some other way and phpMyAdmin gets user name
|
||||
|
||||
@@ -297,13 +297,6 @@ $cfg['Servers'][$i]['SignonURL'] = '';
|
||||
*/
|
||||
$cfg['Servers'][$i]['LogoutURL'] = '';
|
||||
|
||||
/**
|
||||
* Whether to try to connect without password
|
||||
*
|
||||
* @global boolean $cfg['Servers'][$i]['nopassword']
|
||||
*/
|
||||
$cfg['Servers'][$i]['nopassword'] = false;
|
||||
|
||||
/**
|
||||
* If set to a db-name, only this db is displayed in navigation panel
|
||||
* It may also be an array of db-names
|
||||
|
||||
@@ -416,9 +416,7 @@ class ConfigFile
|
||||
$dsn = 'mysqli://';
|
||||
if ($this->getValue("$path/auth_type") == 'config') {
|
||||
$dsn .= $this->getValue("$path/user");
|
||||
if (! $this->getValue("$path/nopassword")
|
||||
|| ! empty($this->getValue("$path/password"))
|
||||
) {
|
||||
if (! empty($this->getValue("$path/password"))) {
|
||||
$dsn .= ':***';
|
||||
}
|
||||
$dsn .= '@';
|
||||
|
||||
@@ -285,23 +285,6 @@ class Validator
|
||||
'Server'
|
||||
);
|
||||
|
||||
// If failed 'with' password, try 'without' password
|
||||
if ($test !== true
|
||||
&& !empty($values['Servers/1/nopassword'])
|
||||
&& $values['Servers/1/nopassword']
|
||||
) {
|
||||
$password = '';
|
||||
$test = static::testDBConnection(
|
||||
empty($values['Servers/1/connect_type']) ? '' : $values['Servers/1/connect_type'],
|
||||
empty($values['Servers/1/host']) ? '' : $values['Servers/1/host'],
|
||||
empty($values['Servers/1/port']) ? '' : $values['Servers/1/port'],
|
||||
empty($values['Servers/1/socket']) ? '' : $values['Servers/1/socket'],
|
||||
empty($values['Servers/1/user']) ? '' : $values['Servers/1/user'],
|
||||
$password,
|
||||
'Server'
|
||||
);
|
||||
}
|
||||
|
||||
if ($test !== true) {
|
||||
$result = array_merge($result, $test);
|
||||
}
|
||||
|
||||
@@ -705,8 +705,6 @@ $strConfigServers_central_columns_desc = __(
|
||||
'Leave blank for no central columns support, suggested: '
|
||||
. '[kbd]pma__central_columns[/kbd].'
|
||||
);
|
||||
$strConfigServers_nopassword_desc = __('Try to connect without password.');
|
||||
$strConfigServers_nopassword_name = __('Connect without password');
|
||||
$strConfigServers_only_db_desc = __(
|
||||
'You can use MySQL wildcard characters (% and _), escape them if you want to '
|
||||
. 'use their literal instances, i.e. use [kbd]\'my\_db\'[/kbd] and not '
|
||||
|
||||
@@ -33,8 +33,7 @@ $forms['Servers']['Server'] = array('Servers' => array(1 => array(
|
||||
'socket',
|
||||
'ssl',
|
||||
'connect_type',
|
||||
'compress',
|
||||
'nopassword')));
|
||||
'compress')));
|
||||
$forms['Servers']['Server_auth'] = array('Servers' => array(1 => array(
|
||||
'auth_type',
|
||||
':group:' . __('Config authentication'),
|
||||
|
||||
@@ -506,7 +506,7 @@ class ConfigFileTest extends PMATestCase
|
||||
)
|
||||
);
|
||||
$this->assertEquals(
|
||||
"mysqli://testUser:***@example.com:21",
|
||||
"mysqli://testUser@example.com:21",
|
||||
$this->object->getServerDSN(1)
|
||||
);
|
||||
|
||||
@@ -519,8 +519,8 @@ class ConfigFileTest extends PMATestCase
|
||||
"connect_type" => "socket",
|
||||
"host" => "example.com",
|
||||
"port" => "21",
|
||||
"nopassword" => "yes",
|
||||
"socket" => "123"
|
||||
"socket" => "123",
|
||||
"password" => "",
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -539,7 +539,6 @@ class ConfigFileTest extends PMATestCase
|
||||
"connect_type" => "tcp",
|
||||
"host" => "example.com",
|
||||
"port" => "21",
|
||||
"nopassword" => "yes",
|
||||
"password" => "testPass"
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user