OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: speedy on July 16, 2017, 03:34:34 pm

Title: Trailing whitespace
Post by: speedy on July 16, 2017, 03:34:34 pm
Hello everyone.

I was having a problem with one of my firewall aliases. The cause was accidental trailing whitespace. However, this was not obvious from the user interface, so it took me some time to figure out where I had made the error.

I don't think I'm the only newbie who might make a mistake like this, so maybe the user interface could somehow warn the user that a particular input field has trailing whitespace?
Title: Re: Trailing whitespace
Post by: franco on July 16, 2017, 06:36:30 pm
Hi speedy,

Which field? Some fields have validation for that reason, some fields can't have validation because they are being fed arbitrary strings including whitespace / UTF-8, etc.


Cheers,
Franco
Title: Re: Trailing whitespace
Post by: speedy on July 16, 2017, 08:36:59 pm
Spamhaus drop URL table had accidentally two trailing spaces.
like this: https://www.spamhaus.org/drop/drop.txt 
correct value is: https://www.spamhaus.org/drop/drop.txt

It failed silently, and it was not instantly obvious that I had trailing white space.
Title: Re: Trailing whitespace
Post by: speedy on July 16, 2017, 08:46:33 pm
Maybe whitespace could be somehow made visible? With color for example?
Title: Re: Trailing whitespace
Post by: fabian on July 16, 2017, 09:14:23 pm
in this case a whitespace character is forbidden. It can be removed without issues because it would be converted to a "+" if it would be used.