mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	strip slashes from all _GET, _POST, _COOKIE, _REQUEST if magic quotes is on
This commit is contained in:
		
							parent
							
								
									d3955f17c1
								
							
						
					
					
						commit
						cc603741d7
					
				|  | @ -76,4 +76,19 @@ if(isset($settings->_extraPath)) | |||
| if(isset($settings->_maxExecutionTime)) | ||||
| 	ini_set('max_execution_time', $settings->_maxExecutionTime); | ||||
| 
 | ||||
| if (get_magic_quotes_gpc()) { | ||||
| 	$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); | ||||
| 	while (list($key, $val) = each($process)) { | ||||
| 		foreach ($val as $k => $v) { | ||||
| 			unset($process[$key][$k]); | ||||
| 			if (is_array($v)) { | ||||
| 				$process[$key][stripslashes($k)] = $v; | ||||
| 				$process[] = &$process[$key][stripslashes($k)]; | ||||
| 			} else { | ||||
| 				$process[$key][stripslashes($k)] = stripslashes($v); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	unset($process); | ||||
| } | ||||
| ?>
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann