From 26f0c0852246c89a860a78d62111e9d50157502f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 7 Sep 2017 14:04:43 +0300 Subject: [PATCH] MXS-1389: Allow mandatory commands to pass All commands that are deemed mandatory must be allowed to pass through the filter. --- server/modules/filter/dbfwfilter/dbfwfilter.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/modules/filter/dbfwfilter/dbfwfilter.cc b/server/modules/filter/dbfwfilter/dbfwfilter.cc index d930b95e3..f73c65f36 100644 --- a/server/modules/filter/dbfwfilter/dbfwfilter.cc +++ b/server/modules/filter/dbfwfilter/dbfwfilter.cc @@ -1383,9 +1383,13 @@ int DbfwSession::routeQuery(GWBUF* buffer) } SUser suser = find_user_data(this_thread.users, user(), remote()); - bool query_ok = command_is_mandatory(buffer); + bool query_ok = false; - if (suser) + if (command_is_mandatory(buffer)) + { + query_ok = true; + } + else if (suser) { char* rname = NULL; bool match = suser->match(m_instance, this, analyzed_queue, &rname);