diff options
Diffstat (limited to 'phpBB/includes/acp')
| -rw-r--r-- | phpBB/includes/acp/acp_extensions.php | 17 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_groups.php | 3 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_users.php | 2 | 
3 files changed, 13 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_extensions.php b/phpBB/includes/acp/acp_extensions.php index c5c17cb559..c21c9f4e9d 100644 --- a/phpBB/includes/acp/acp_extensions.php +++ b/phpBB/includes/acp/acp_extensions.php @@ -55,6 +55,11 @@ class acp_extensions  			$ext_name = '';  		} +		if (in_array($action, array('enable', 'disable', 'delete_data')) && !check_link_hash($request->variable('hash', ''), $action . '.' . $ext_name)) +		{ +			trigger_error('FORM_INVALID', E_USER_WARNING); +		} +  		// If they've specified an extension, let's load the metadata manager and validate it.  		if ($ext_name)  		{ @@ -98,7 +103,7 @@ class acp_extensions  				$template->assign_vars(array(  					'PRE'				=> true,  					'L_CONFIRM_MESSAGE'	=> $this->user->lang('EXTENSION_ENABLE_CONFIRM', $md_manager->get_metadata('display-name')), -					'U_ENABLE'			=> $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name), +					'U_ENABLE'			=> $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('enable.' . $ext_name),  				));  			break; @@ -117,7 +122,7 @@ class acp_extensions  						{  							$template->assign_var('S_NEXT_STEP', true); -							meta_refresh(0, $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name)); +							meta_refresh(0, $this->u_action . '&action=enable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('enable.' . $ext_name));  						}  					}  				} @@ -144,7 +149,7 @@ class acp_extensions  				$template->assign_vars(array(  					'PRE'				=> true,  					'L_CONFIRM_MESSAGE'	=> $this->user->lang('EXTENSION_DISABLE_CONFIRM', $md_manager->get_metadata('display-name')), -					'U_DISABLE'			=> $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name), +					'U_DISABLE'			=> $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('disable.' . $ext_name),  				));  			break; @@ -156,7 +161,7 @@ class acp_extensions  					{  						$template->assign_var('S_NEXT_STEP', true); -						meta_refresh(0, $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name)); +						meta_refresh(0, $this->u_action . '&action=disable&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('disable.' . $ext_name));  					}  				} @@ -177,7 +182,7 @@ class acp_extensions  				$template->assign_vars(array(  					'PRE'				=> true,  					'L_CONFIRM_MESSAGE'	=> $this->user->lang('EXTENSION_DELETE_DATA_CONFIRM', $md_manager->get_metadata('display-name')), -					'U_PURGE'			=> $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name), +					'U_PURGE'			=> $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('delete_data.' . $ext_name),  				));  			break; @@ -191,7 +196,7 @@ class acp_extensions  						{  							$template->assign_var('S_NEXT_STEP', true); -							meta_refresh(0, $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name)); +							meta_refresh(0, $this->u_action . '&action=delete_data&ext_name=' . urlencode($ext_name) . '&hash=' . generate_link_hash('delete_data.' . $ext_name));  						}  					}  				} diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index ad29a5521b..c170c67d49 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -324,7 +324,7 @@ class acp_groups  					$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();  					// This is normalised data, without the group_ prefix -					$avatar_data = \phpbb\avatar\manager::clean_row($group_row); +					$avatar_data = \phpbb\avatar\manager::clean_row($group_row, 'group');  				} @@ -657,7 +657,6 @@ class acp_groups  					'GROUP_HIDDEN'		=> $type_hidden,  					'U_BACK'			=> $u_back, -					'U_SWATCH'			=> append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour'),  					'U_ACTION'			=> "{$this->u_action}&action=$action&g=$group_id",  					'L_AVATAR_EXPLAIN'	=> phpbb_avatar_explanation_string(),  				)); diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index fd9c17f171..6b86cb4a5a 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1745,7 +1745,7 @@ class acp_users  					$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();  					// This is normalised data, without the user_ prefix -					$avatar_data = \phpbb\avatar\manager::clean_row($user_row); +					$avatar_data = \phpbb\avatar\manager::clean_row($user_row, 'user');  					if ($submit)  					{  | 
