Jump to content

question about array_walk


darkfreaks

Recommended Posts

ok so i have a question i have a clean function that i wanna loop on all post variables so i tried calling it like this

 

<?php
//somehow leaking SQL injection
function clean($var){
$var=trim(strip_tags(mysql_real_escape_string($var)));
$var=htmlspecialchars($var,ENT_QUOTES);
return $var;

array_walk($_POST,'clean'); // arraying post variables and cleaning which doesnt work or leaks injection

?>

Link to comment
https://forums.phpfreaks.com/topic/136590-question-about-array_walk/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.