pySigma-backend-sqlite 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pySigma-backend-sqlite
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: pySigma sqlite backend
5
5
  License-Expression: LGPL-3.0-only
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pySigma-backend-sqlite"
3
- version = "1.2.0"
3
+ version = "1.2.2"
4
4
  description = "pySigma sqlite backend"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -13,6 +13,7 @@ from sigma.conditions import (
13
13
  )
14
14
  from sigma.types import (
15
15
  SigmaCompareExpression,
16
+ SigmaRegularExpression,
16
17
  SigmaString,
17
18
  SpecialChars,
18
19
  SigmaCIDRExpression,
@@ -477,6 +478,12 @@ class sqliteBackend(TextQueryBackend):
477
478
  else:
478
479
  return converted
479
480
 
481
+ def convert_value_re(
482
+ self, r: SigmaRegularExpression, state: ConversionState
483
+ ) -> str:
484
+ # Doubling single quotes is mandatory: the regex is embedded in a '...' SQL string literal.
485
+ return super().convert_value_re(r, state).replace("'", "''")
486
+
480
487
  def convert_condition_field_eq_val_str(
481
488
  self, cond: ConditionFieldEqualsValueExpression, state: ConversionState
482
489
  ) -> Union[str, DeferredQueryExpression]: