Changeset 405
- Timestamp:
- 03/19/07 23:59:40 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ipo/request/stubWebRequest.php
r402 r405 25 25 protected function doConstuct() 26 26 { 27 $this->unsecureParams = array_merge( $_GET, $_POST);27 $this->unsecureParams = array_merge(array_map(array($this, 'stripslashes'), $_GET), array_map(array($this, 'stripslashes'), $_POST)); 28 28 foreach ($_SERVER as $key => $value) { 29 29 if (substr($key, 0, 5) == 'HTTP_' || substr($key, 0, 7) == 'REMOTE_') { … … 32 32 } 33 33 $this->unsecureCookies = $_COOKIE; 34 } 35 36 /** 37 * strips slashes from request variables, even if request variable is an array 38 * (wrapper around native stripslashes()) 39 * 40 * @param string|array $value request variable value to apply stripslashes on 41 * @return string|array stripslashed' value 42 */ 43 private function stripSlashes($value) 44 { 45 if (is_array($value) == FALSE) { 46 $value = stripslashes($value); 47 } else { 48 $tmp = array(); 49 foreach ($value as $id => $content) { 50 $tmp[$id] = $this->stripslashes($content); 51 } 52 53 $value = $tmp; 54 } 55 56 return $value; 34 57 } 35 58
