]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
allow bare %{...} in conditions
authorAlan T. DeKok <aland@freeradius.org>
Tue, 10 Sep 2019 14:33:56 +0000 (10:33 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 10 Sep 2019 14:34:59 +0000 (10:34 -0400)
which for now are parsed and printed as double-quoted strings.

But it makes some things much easier

src/tests/unit/condition.txt

index ecfae7b5d438784e8dae06f544b6bf9ff4927a3c..faa9c61774e7629cccf12e3e2e6062139aaaf0c2 100644 (file)
@@ -236,6 +236,12 @@ data true
 condition <ipaddr>127.0.0.1 == "%{sql: 127.0.0.1}"
 data <ipaddr>127.0.0.1 == "%{sql: 127.0.0.1}"
 
+#
+#  Bare %{...} is allowed.
+#
+condition <ipaddr>127.0.0.1 == %{sql:127.0.0.1}
+data <ipaddr>127.0.0.1 == "%{sql:127.0.0.1}"
+
 condition <ether> 00:11:22:33:44:55 == "00:11:22:33:44:55"
 data true