mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
http: fix password capture when enabled
The current implementation would only log, if the password contains a colon, the part before the first colon (e.g., the password `password:password` would be logged as `password`). A test has been added to confirm the expected behaviour.
This commit is contained in:
parent
79ebce6e3c
commit
88368ae856
4 changed files with 21 additions and 2 deletions
|
@ -338,8 +338,8 @@ event http_header(c: connection, is_orig: bool, name: string, value: string) &pr
|
|||
if ( /^[bB][aA][sS][iI][cC] / in value )
|
||||
{
|
||||
local userpass = decode_base64_conn(c$id, sub(value, /[bB][aA][sS][iI][cC][[:blank:]]+/, ""));
|
||||
local up = split_string(userpass, /:/);
|
||||
if ( |up| >= 2 )
|
||||
local up = split_string1(userpass, /:/);
|
||||
if ( |up| == 2 )
|
||||
{
|
||||
c$http$username = up[0];
|
||||
if ( c$http$capture_password )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue