diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-11-24 22:22:38 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-11-24 22:22:38 +0100 |
commit | 23f5b6debdd24cc1caefd3bb8cd6da96a88abe9a (patch) | |
tree | 280bb5bc2734b5a0976b7ceefac94bb0899a399a /phpBB/phpbb/install/module | |
parent | 145ba85d981f6bb3b6ebba74bcefb879da62d932 (diff) | |
download | forums-23f5b6debdd24cc1caefd3bb8cd6da96a88abe9a.tar forums-23f5b6debdd24cc1caefd3bb8cd6da96a88abe9a.tar.gz forums-23f5b6debdd24cc1caefd3bb8cd6da96a88abe9a.tar.bz2 forums-23f5b6debdd24cc1caefd3bb8cd6da96a88abe9a.tar.xz forums-23f5b6debdd24cc1caefd3bb8cd6da96a88abe9a.zip |
[ticket/14875] Add method for untrimmed input to ajax iohandler
Due to the pre-encoded input and the escaping of the input, the
string has to be decoded twice for the password.
PHPBB3-14875
Diffstat (limited to 'phpBB/phpbb/install/module')
-rw-r--r-- | phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php b/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php index ce720dbf76..9019cf4332 100644 --- a/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php +++ b/phpBB/phpbb/install/module/obtain_data/task/obtain_database_data.php @@ -79,10 +79,19 @@ class obtain_database_data extends \phpbb\install\task_base implements \phpbb\in $dbhost = $this->io_handler->get_input('dbhost', '', true); $dbport = $this->io_handler->get_input('dbport', ''); $dbuser = $this->io_handler->get_input('dbuser', ''); - $dbpasswd = $this->io_handler->get_input('dbpasswd', '', true); $dbname = $this->io_handler->get_input('dbname', ''); $table_prefix = $this->io_handler->get_input('table_prefix', ''); + // Need to get untrimmed password when using ajax IO handler + if ($this->io_handler instanceof \phpbb\install\helper\iohandler\ajax_iohandler) + { + $dbpasswd = htmlspecialchars_decode(htmlspecialchars_decode($this->io_handler->get_untrimmed_input('dbpasswd', '', true))); + } + else + { + $dbpasswd = $this->io_handler->get_input('dbpasswd', '', true); + } + // Check database data $user_data_vaild = $this->check_database_data($dbms, $dbhost, $dbport, $dbuser, $dbpasswd, $dbname, $table_prefix); |