1097 |
// |
// |
1098 |
return false; |
return false; |
1099 |
} |
} |
1100 |
|
|
1101 |
|
/** |
1102 |
|
* XXX Méthode à supprimer après que les externals du core soient dé-fixé |
1103 |
|
* |
1104 |
|
* Méthode de prévention des failles de sécurités en nettoyant les variables |
1105 |
|
* passées en paramètre. |
1106 |
|
* |
1107 |
|
* @param mixed $input valeurs à netoyer |
1108 |
|
* |
1109 |
|
* @return mixed valeurs nétoyées |
1110 |
|
*/ |
1111 |
|
function clean_break($input) { |
1112 |
|
if(is_array($input)) { |
1113 |
|
foreach($input as $key => $value) { |
1114 |
|
$input[$key] = $this->clean_break($value); |
1115 |
|
} |
1116 |
|
} else { |
1117 |
|
//remove whitespace... |
1118 |
|
$input = trim($input); |
1119 |
|
//disable magic quotes... |
1120 |
|
if(get_magic_quotes_gpc()) { |
1121 |
|
stripslashes($input); |
1122 |
|
} |
1123 |
|
//prevent sql injection... |
1124 |
|
if(!is_numeric($input)) { |
1125 |
|
if(isset($this->db)) { |
1126 |
|
$this->db->escapeSimple($input); |
1127 |
|
} |
1128 |
|
} |
1129 |
|
//prevent xss... |
1130 |
|
$input = strip_tags($input); |
1131 |
|
} |
1132 |
|
return $input; |
1133 |
|
} |
1134 |
} |
} |
1135 |
|
|
1136 |
?> |
?> |