mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
mysql: Fix auth_plugin_data_part2 length computation
This commit is contained in:
parent
c82756bda4
commit
e98b80d140
1 changed files with 3 additions and 2 deletions
|
@ -240,13 +240,14 @@ type Handshake_v10 = record {
|
|||
status_flags : uint16;
|
||||
capability_flags_2 : uint16;
|
||||
auth_plugin_data_len : uint8;
|
||||
reserved : padding[10];
|
||||
auth_plugin_data_part_2: bytestring &length=13;
|
||||
reserved : padding[10];
|
||||
auth_plugin_data_part_2: bytestring &length=auth_plugin_data_part_2_len;
|
||||
have_plugin : case ( ( capability_flags_2 << 16 ) & CLIENT_PLUGIN_AUTH ) of {
|
||||
CLIENT_PLUGIN_AUTH -> auth_plugin: NUL_String;
|
||||
0x0 -> none : empty;
|
||||
};
|
||||
} &let {
|
||||
auth_plugin_data_part_2_len = (auth_plugin_data_len > 8 && (auth_plugin_data_len - 8) > 13) ? auth_plugin_data_len - 8 : 13;
|
||||
update_auth_plugin: bool = $context.connection.set_auth_plugin(auth_plugin)
|
||||
&if( ( capability_flags_2 << 16 ) & CLIENT_PLUGIN_AUTH );
|
||||
server_query_attrs: bool = $context.connection.set_server_query_attrs(( capability_flags_2 << 16 ) & CLIENT_QUERY_ATTRIBUTES);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue