From 7ec7e1d174b5470c339e5a9653b01ea2b17a7134 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 2 Apr 2025 18:01:20 +0200 Subject: [PATCH] Firewall: Aliases - fix regression in alias table in json format (https://github.com/opnsense/core/issues/8277) In order to support both formats, we should break with the first succesful compile(). A workaround in the current version is to omit the {.} in the path expression. --- src/opnsense/scripts/filter/lib/alias/uri.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/opnsense/scripts/filter/lib/alias/uri.py b/src/opnsense/scripts/filter/lib/alias/uri.py index d28f586e1..ab8e867fe 100755 --- a/src/opnsense/scripts/filter/lib/alias/uri.py +++ b/src/opnsense/scripts/filter/lib/alias/uri.py @@ -88,6 +88,7 @@ class UriParser(BaseContentParser): for expr in [self._path_expression, ".%s" % self._path_expression]: try: jqc = jq.compile(expr) + break except Exception as e: if jqc_exception is None: jqc_exception = e