diff options
-rw-r--r-- | phpBB/includes/functions_display.php | 4 | ||||
-rw-r--r-- | phpBB/memberlist.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/avatar/driver/remote.php | 18 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php | 5 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/contact_admin_form.php | 5 |
5 files changed, 29 insertions, 5 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 745eb20c77..48c34ecfe6 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1491,7 +1491,7 @@ function phpbb_get_user_rank($user_data, $user_posts) /** * Prepare profile data */ -function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false) +function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false, $check_can_receive_pm = true) { global $config, $auth, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher; @@ -1559,7 +1559,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl } // Can this user receive a Private Message? - $can_receive_pm = ( + $can_receive_pm = $check_can_receive_pm && ( // They must be a "normal" user $data['user_type'] != USER_IGNORE && diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 439b97b47f..4f31178ffb 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1427,7 +1427,7 @@ switch ($mode) $cp_row = (isset($profile_fields_cache[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields_cache[$user_id], false) : array(); } - $memberrow = array_merge(phpbb_show_profile($row), array( + $memberrow = array_merge(phpbb_show_profile($row, false, false, false), array( 'ROW_NUMBER' => $i + ($start + 1), 'S_CUSTOM_PROFILE' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, diff --git a/phpBB/phpbb/avatar/driver/remote.php b/phpBB/phpbb/avatar/driver/remote.php index 1bd7f6c927..4b0ee3f06f 100644 --- a/phpBB/phpbb/avatar/driver/remote.php +++ b/phpBB/phpbb/avatar/driver/remote.php @@ -130,8 +130,24 @@ class remote extends \phpbb\avatar\driver\driver { // Timeout after 1 second stream_set_timeout($file_stream, 1); + // read some data to ensure headers are present + fread($file_stream, 1024); $meta = stream_get_meta_data($file_stream); - foreach ($meta['wrapper_data'] as $header) + + if (isset($meta['wrapper_data']['headers']) && is_array($meta['wrapper_data']['headers'])) + { + $headers = $meta['wrapper_data']['headers']; + } + else if (isset($meta['wrapper_data']) && is_array($meta['wrapper_data'])) + { + $headers = $meta['wrapper_data']; + } + else + { + $headers = array(); + } + + foreach ($headers as $header) { $header = preg_split('/ /', $header, 2); if (strtr(strtolower(trim($header[0], ':')), '_', '-') === 'content-type') diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php index f593c32181..2cc7786046 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_5_rc1.php @@ -55,6 +55,9 @@ class release_3_0_5_rc1 extends \phpbb\db\migration\migration public function hash_old_passwords() { + global $phpbb_container; + + $passwords_manager = $phpbb_container->get('passwords.manager'); $sql = 'SELECT user_id, user_password FROM ' . $this->table_prefix . 'users WHERE user_pass_convert = 1'; @@ -65,7 +68,7 @@ class release_3_0_5_rc1 extends \phpbb\db\migration\migration if (strlen($row['user_password']) == 32) { $sql_ary = array( - 'user_password' => phpbb_hash($row['user_password']), + 'user_password' => '$CP$' . $passwords_manager->hash($row['user_password'], 'passwords.driver.salted_md5'), ); $this->sql_query('UPDATE ' . $this->table_prefix . 'users SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . $row['user_id']); diff --git a/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php index c2dd09ddf6..5736369f1a 100644 --- a/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php +++ b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php @@ -20,6 +20,11 @@ class contact_admin_form extends \phpbb\db\migration\migration return isset($this->config['contact_admin_form_enable']); } + static public function depends_on() + { + return array('\phpbb\db\migration\data\v310\config_db_text'); + } + public function update_data() { return array( |