mysql_real_escape
-
The two instances of mysql_real_escape in ip-based-login.php seems to cause some trouble.
Solved by rewriting the sanitize_variables function to this:
function sanitize_variables($variables = array()){
global $wpdb;
if(is_array($variables)){
foreach($variables as $k => $v){
$variables[$k] = trim($v);
$variables[$k] = escapeshellcmd($v);
$variables[$k] = $wpdb->_real_escape($v);
}
}else{
$variables = $wpdb->_real_escape(escapeshellcmd(trim($variables)));
}return $variables;
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘mysql_real_escape’ is closed to new replies.