Merge pull request #598 from jgen/develop
#597: Fix for XSS issue in chatbox extension.
This commit is contained in:
		
						commit
						72de620b42
					
				| @ -10,14 +10,22 @@ | ||||
| 
 | ||||
| 	$admin = loggedIn(); | ||||
| 	 | ||||
| 	$log = 1; | ||||
| 	 | ||||
| 	if (isset($_GET['log'])) | ||||
| 	{ | ||||
| 		$log = $_GET['log']; | ||||
| 	} | ||||
| 	 | ||||
| 	if (isset($_POST['log'])) | ||||
| 	{ | ||||
| 		$log = $_POST['log']; | ||||
| 	} | ||||
| 
 | ||||
| 	if (!isset($log)) | ||||
| 	if (filter_var($log, FILTER_VALIDATE_INT) === false) | ||||
| 	{ | ||||
| 		$log = 1; | ||||
| 	} | ||||
| 	 | ||||
| 	$ys = ys($log); | ||||
| 	$posts = $ys->posts(); | ||||
|  | ||||
| @ -89,7 +89,10 @@ | ||||
| 		global $yShout, $prefs; | ||||
| 		if ($yShout) return $yShout; | ||||
| 
 | ||||
| 		if ($log > $prefs['logs'] || $log < 0 || !is_numeric($log)) $log = 1; | ||||
| 		if (filter_var($log, FILTER_VALIDATE_INT, array("options" => array("min_range" => 0, "max_range" => $prefs['logs']))) === false) | ||||
| 		{ | ||||
| 		  $log = 1; | ||||
| 		} | ||||
| 		 | ||||
| 		$log = 'log.' . $log; | ||||
| 		return new YShout($log, loggedIn()); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user