Skip to content

Commit 18db51a

Browse files
committed
Fix: field name quoting
Fixes Single quoting of field names breaking SPL #7
1 parent 74882d4 commit 18db51a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pysigma-backend-splunk"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
description = "pySigma Splunk backend"
55
authors = ["Thomas Patzke <[email protected]>"]
66
license = "LGPL-2.1-only"

sigma/backends/splunk/splunk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SplunkBackend(TextQueryBackend):
3535
not_token : ClassVar[str] = "NOT"
3636
eq_token : ClassVar[str] = "="
3737

38-
field_quote: ClassVar[str] = "'"
38+
field_quote: ClassVar[str] = '"'
3939
field_quote_pattern: ClassVar[Pattern] = re.compile("^[\w.]+$")
4040

4141
str_quote : ClassVar[str] = '"'

tests/test_backend_splunk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_splunk_field_name_with_whitespace(splunk_backend : SplunkBackend):
3939
field name: valueA
4040
condition: sel
4141
""")
42-
) == ['\'field name\'="valueA"']
42+
) == ['"field name"="valueA"']
4343

4444
def test_splunk_regex_query(splunk_backend : SplunkBackend):
4545
assert splunk_backend.convert(

0 commit comments

Comments
 (0)