also block autocomplete for % / _
This commit is contained in:
		
							parent
							
								
									bc45944ac9
								
							
						
					
					
						commit
						bef1628b08
					
				| @ -14,7 +14,12 @@ class AutoComplete extends Extension { | |||||||
| 		if($event->page_matches("api/internal/autocomplete")) { | 		if($event->page_matches("api/internal/autocomplete")) { | ||||||
| 			if(!isset($_GET["s"])) return; | 			if(!isset($_GET["s"])) return; | ||||||
| 			$s = strtolower($_GET["s"]); | 			$s = strtolower($_GET["s"]); | ||||||
| 			if(strlen($s) == 0 || strlen($s) > 32) return; | 			if( | ||||||
|  | 				$s == '' || | ||||||
|  | 				$s == '_' || | ||||||
|  | 				$s == '%' || | ||||||
|  | 				strlen($s) > 32 | ||||||
|  | 			) return; | ||||||
| 
 | 
 | ||||||
| 			//$limit = 0;
 | 			//$limit = 0;
 | ||||||
| 			$cache_key = "autocomplete-$s"; | 			$cache_key = "autocomplete-$s"; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user