]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we need '&' here
authorAlan T. DeKok <aland@freeradius.org>
Sat, 18 Jan 2025 23:17:40 +0000 (18:17 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 19 Jan 2025 01:52:15 +0000 (20:52 -0500)
because we have not yet updated the xlat function argument parser
to treat bare words as being attribute references

src/tests/keywords/attr-index-eval
src/tests/keywords/foreach-key-ref

index de9df853191e75c08d1730473bcb8531e7652227..c2ddf4ed20d9664323751c5a9db4f39ae8f207f3 100644 (file)
@@ -8,7 +8,7 @@ index := 1
 #
 #  Dynamically create an attribute reference
 #
-ref = "Filter-Id[" + (string) index + "]"
+ref = "&Filter-Id[" + (string) index + "]"
 
 #
 # Evaluate the attribute as an unlang expression.
index 10c2e4b8dca9e80f5bad5d8d0a31af51b21f0fbe..09bcee68f356135cc8cbdeb4e9021357e69074ef 100644 (file)
@@ -14,7 +14,7 @@ Tmp-String-1 := { "a", "b", "c", "d" }
 foreach string key, string name (Tmp-String-0[*]) {
        total += key
        total += " = '"
-       total += %eval(%{key})
+       total += %eval(%{"&" + %{key}})
        total += "', "
 }