els0r / goProbe

High-performance IP packet metadata aggregation and efficient storage and querying of flows
GNU General Public License v2.0
12 stars 4 forks source link

[bugfix] Strip whitespace from `args.Query` when sanitizing it #348

Closed els0r closed 1 month ago

els0r commented 1 month ago

This fixes a bug where queries such as "sip, dip,dport" wouldn't be evaluated only because of the whitespace in them.

The implicit assumption was that this wouldn't happen if called from the command line (due to the arguments being evaluated as []string{..., "sip,", "dip,dport"}. For the json case, this is very much a valid way of passing the arguments.

Sanitization is applied both in goQuery (to local DB) and global-query.

Closes #347 .