usbguard icon indicating copy to clipboard operation
usbguard copied to clipboard

Ignore whitespace around rule

Open kumavale opened this issue 1 year ago • 1 comments

Fixes #571

Allow rules in 'rules.conf' to start and end with spaces. It also allowed lines with only spaces.

$ cat -A rules.conf
allow $
 $

I would like to allow these characters because they are invisible, but I would like to hear your opinion about lines starting with spaces.

$ cat -A rules.conf
 allow$

kumavale avatar Sep 29 '24 12:09 kumavale

Hello, Wouldn't it be better if the rule struct had an optional comment at the beginning of the rule? Similar to how the optional comment at the end is being handled? In that case the rule_gramar would not require changes.

Cropi avatar Apr 23 '25 11:04 Cropi