mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Bug#16169063: SECURITY CONCERN BECAUSE OF INSUFFICIENT LOGGING
PROBLEM: If multiple statements are sent by a single request then only the last statement was getting logged. An attacker can bypass the audit log just by sending two comsecutive statements in one request. SOLUTION: Each statements from a single request are logged.
This commit is contained in:
parent
775dbed9d0
commit
b29fb8c459
1 changed files with 5 additions and 0 deletions
|
@ -1048,6 +1048,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
thd->update_server_status();
|
||||
thd->protocol->end_statement();
|
||||
query_cache_end_of_result(thd);
|
||||
|
||||
mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_STATUS,
|
||||
thd->stmt_da->is_error() ? thd->stmt_da->sql_errno()
|
||||
: 0, command_name[command].str);
|
||||
|
||||
ulong length= (ulong)(packet_end - beginning_of_next_stmt);
|
||||
|
||||
log_slow_statement(thd);
|
||||
|
|
Loading…
Reference in a new issue