Update database.php
This commit is contained in:
parent
8a2a3def51
commit
91d3a550fb
|
@ -288,7 +288,7 @@ if(!is_fn("get_bind_to_sql_insert")) {
|
||||||
$setfixeds = get_array(get_value_in_array("setfixeds", $options, false));
|
$setfixeds = get_array(get_value_in_array("setfixeds", $options, false));
|
||||||
$setignores = get_array(get_value_in_array("setignores", $options, false));
|
$setignores = get_array(get_value_in_array("setignores", $options, false));
|
||||||
$setwheres = get_array(get_value_in_array("setwheres", $options, false));
|
$setwheres = get_array(get_value_in_array("setwheres", $options, false));
|
||||||
|
|
||||||
// safemode_off (default: false)
|
// safemode_off (default: false)
|
||||||
$safemode_off = array_key_equals("safemode_off", $options, true);
|
$safemode_off = array_key_equals("safemode_off", $options, true);
|
||||||
|
|
||||||
|
@ -322,10 +322,12 @@ if(!is_fn("get_bind_to_sql_insert")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// preventing incident query
|
// preventing incident query
|
||||||
$num_conditions = sum($num_keys, $num_wheres);
|
if($num_duplicates > 0)
|
||||||
if($num_conditions == 0 && $safemode_off !== true) {
|
$num_conditions = array_sum(array($num_keys, $num_wheres));
|
||||||
write_common_log("suspicious incident query. blocked. (safemode=1)", "system/database");
|
if($num_conditions == 0 && $safemode_off !== true) {
|
||||||
return false;
|
write_common_log("suspicious incident query. blocked. (safemode=1)", "system/database");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check ignores
|
// check ignores
|
||||||
|
|
Loading…
Reference in New Issue
Block a user