[syslog-ng] Quoting in filters
Gabor Nagy (gnagy)
Gabor.Nagy at oneidentity.com
Mon Aug 5 08:20:09 UTC 2019
I would say, that the rule of thumb is that you should quote where a string is expected in values.
Our grammar accepts strings without quotes, but then it is possible to have collision with config keywords (e.g. syslog is a keyword).
So, in case of netmask(), this one should be used: netmask("127.0.0.1/32").
> I think that maybe some filters, the ones that take strings essentially, are quoted, and not the ones that take numeric data. Is that correct?
Exactly, just like I described above.
Regards,
Gabor
________________________________
From: syslog-ng <syslog-ng-bounces at lists.balabit.hu> on behalf of Faine, Mark R. (MSFC-IS40)[NICS] <mark.faine at nasa.gov>
Sent: Friday, August 2, 2019 19:57
To: Syslog-ng users' and developers' mailing list <syslog-ng at lists.balabit.hu>
Subject: [syslog-ng] Quoting in filters
CAUTION: This email originated from outside of the organization. Do not follow guidance, click links, or open attachments unless you recognize the sender and know the content is safe.
What is the policy on quoting values in filters? In the docs it seems that sometimes they are quoted and other times they are not. For example, are these equivalent:
netmask (127.0.0.1/32) and netmask(“127.0.0.1/32”)
I think that maybe some filters, the ones that take strings essentially, are quoted, and not the ones that take numeric data. Is that correct?
Thanks,
-Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20190805/25d02536/attachment.html>
More information about the syslog-ng
mailing list