-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error at offset #143
Comments
Thanks for this very detailed report, I'll replace the escape function to handle more characters. FYI, I didn't use the Redis TAGS for the values. |
…character and conversion error for the groupby Signed-off-by: Thomas Labarussias <[email protected]>
…character and conversion error for the groupby Signed-off-by: Thomas Labarussias <[email protected]>
The PR #145 fixes that issue, it will be included in the next release. The ETA is before summer. |
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh with Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue with Mark the issue as fresh with Provide feedback via https://github.com/falcosecurity/community. |
@poiana: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Describe the bug
We are getting the error
Syntax error at offset
in our logs. The occurs when any special character of,.<>{}[]"':;!@#$%^&*()+=~
is added to theSearch
bar of theEvents
section in the UI.How to reproduce it
Install the Falco Helm chart with Falcosidekick (using version
4.3.0
, which corresponds to app version0.37.1
) and search for an event (with any of the following special character:,.<>{}[]"':;!@#$%^&*()+=~
) in theSearch
bar of theEvents
section.Expected behaviour
No
Syntax error at offset
when special characters,.<>{}[]"':;!@#$%^&*()+=~
is added to theSearch
bar of theEvents
section in the UI.Screenshots
![image](https://private-user-images.githubusercontent.com/140103998/324061171-44d1bb05-233c-4478-9a0d-c32b4e8e8454.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIi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WFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxOTU2MDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xODA1ZTMxYzQ0NTlkYjUwNWIxZmQ0ZDQ3ZmM5OGU5ZmVmYzJmN2M0MTM2YjdlNWRiNDNiZDkzMGJlMTVkZTNhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.vfb-htBF9cU9IkQZUZtD45p0D7For8Lbt1vw3S6AGHM)
When I search for the event time
06:47:14:398
, that has the special character:
, I get the error:But then when I properly escape the
![image](https://private-user-images.githubusercontent.com/140103998/324061389-81179369-9d7a-425c-9af8-b7c8796e922d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTA0NjUsIm5iZiI6MTczOTM5MDE2NSwicGF0aCI6Ii8xNDAxMDM5OTgvMzI0MDYxMzg5LTgxMTc5MzY5LTlkN2EtNDI1Yy05YWY4LWI3Yzg3OTZlOTIyZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxOTU2MDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZmM2Mzg4ZTA2ZWVmMDgxNzRkMTAxYzM1M2I4ZjNmYzdiZTc4MmJhZDllMzllNGE4YTI2NDE0YzFjMjQ3OWU3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.U5atBJ87S_w4E6Iff0uXOKk_D-dybhQF1Y71e3_dF10)
:
using\
(i.e.,06\:47\:14\:398
), I don't get the error:Environment
0.37.1
Linux version 5.15.148.2-2.cm2 (root@CBL-Mariner) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) UI updates #1 SMP Fri Feb 23 23:44:30 UTC 2024
AKS
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.15.10
PRETTY_NAME="Alpine Linux v3.15"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
/app $
Linux falco-falcosidekick-ui-5f89b8bc9d-zn869 5.15.148.2-2.cm2 UI updates #1 SMP Fri Feb 23 23:44:30 UTC 2024 x86_64 Linux
Kubernetes
Additional context
![image](https://private-user-images.githubusercontent.com/140103998/324087009-0208c564-bc7a-4524-b884-d5634e5ce82c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzOTA0NjUsIm5iZiI6MTczOTM5MDE2NSwicGF0aCI6Ii8xNDAxMDM5OTgvMzI0MDg3MDA5LTAyMDhjNTY0LWJjN2EtNDUyNC1iODg0LWQ1NjM0ZTVjZTgyYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxOTU2MDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lM2MxZDNhMmU5Nzk0Y2EzODkzNGE5OTM1Mzc3ZGI0MGMyMGZiMjJiNzQxOGI4ZDY2ODkwZjAxNTY0Y2VlNDY1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Xa95VEB7pXqoOgnQ9EFQEuvQsDJQ1Ld0KBcBv-oViKA)
I believe the issue occurs with the API call
/api/v1/events/count/:groupby
that calls theCountBy
function, then theCountKeyBy
function, then thenewQuery
function that calls the erroneousEscape
function that doesn’t escape all punctuation correctly (see screenshot below). The function correctly escapes hyphens (with the use of a single backslash), but then incorrectly escapes forward slashes and periods by using two backslashes (and omits all other special characters). This is why when we put one of those characters in the search field, we get the error.In Redis, when you query for tags that contain punctuation, you must escape that punctuation with a backslash character (). If not, then you’ll get the error we are seeing (see: https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/tags/ and https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/escaping/).
The text was updated successfully, but these errors were encountered: