Browse Source

! search term errors when using the admin panel to search for members

Spuds 13 years ago
parent
commit
4169b9a7e3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Sources/Admin.php

+ 3 - 2
Sources/Admin.php

@@ -800,7 +800,7 @@ function AdminSearchInternal()
 	$context['page_title'] = $txt['admin_search_results'];
 	$context['search_results'] = array();
 
-	$search_term = strtolower($context['search_term']);
+	$search_term = strtolower(un_htmlspecialchars($context['search_term']));
 	// Go through all the search data trying to find this text!
 	foreach ($search_data as $section => $data)
 	{
@@ -845,7 +845,8 @@ function AdminSearchMember()
 	require_once($sourcedir . '/ManageMembers.php');
 	$_REQUEST['sa'] = 'query';
 
-	$_POST['membername'] = $context['search_term'];
+	$_POST['membername'] = un_htmlspecialchars($context['search_term']);
+	$_POST['types'] = '';
 
 	ViewMembers();
 }