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.
This commit is contained in:
Ad Schellevis 2025-04-02 18:01:20 +02:00
parent 97da2221d7
commit 7ec7e1d174

View File

@ -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