Fix 2 bugs related to firewall

* Query_Processor::find_firewall_whitelist_rule() wasn't correctly finding rules
* SQL injection algorithm should only be triggered if the query isn't blocked already
pull/2525/head
René Cannaò 6 years ago
parent 52362ad1de
commit b0af4d272d

@ -3371,7 +3371,7 @@ __get_pkts_from_client:
}
assert(qpo); // GloQPro->process_mysql_query() should always return a qpo
rc_break=handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_QUERY_qpo(&pkt, &lock_hostgroup);
if (mirror==false) {
if (mirror==false && rc_break==false) {
if (mysql_thread___automatic_detect_sqli) {
if (client_myds->com_field_list == false) {
if (qpo->firewall_whitelist_mode != WUS_OFF) {

@ -2106,7 +2106,7 @@ bool Query_Processor::find_firewall_whitelist_rule(char *username, char *client_
s += rand_del;
s += schemaname;
s += rand_del;
s += flagIN;
s += to_string(flagIN);
std::unordered_map<std::string, void *>:: iterator it;
it = global_mysql_firewall_whitelist_rules.find(s);
if (it != global_mysql_firewall_whitelist_rules.end()) {

Loading…
Cancel
Save