]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
quote bare words in function arguments
authorAlan T. DeKok <aland@freeradius.org>
Mon, 10 Mar 2025 01:23:28 +0000 (21:23 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 10 Mar 2025 01:57:12 +0000 (21:57 -0400)
src/tests/modules/always/set_rcode.unlang
src/tests/modules/always/set_status_revive.unlang
src/tests/modules/cipher/valid.unlang
src/tests/modules/dict/map.unlang
src/tests/modules/eap_sim/sim_xlat_id_aka.unlang
src/tests/modules/json/regression03.unlang
src/tests/modules/test/trigger.unlang
src/tests/modules/unit_test_module.conf

index 1a2eeabbfeb70299dc4b8d172dc09f4dca085e2b..548a51e665fc5f78bbb2c8de0bdd840b17752e8f 100644 (file)
@@ -3,7 +3,7 @@
 #
 if (%db_status('notfound') != "alive") {
        reply += {
-               Reply-Message = "Failure in test at line %interpreter(...line)"
+               Reply-Message = "Failure in test at line %interpreter('...line')"
        }
 }
 
@@ -13,7 +13,7 @@ if (%db_status('notfound') != "alive") {
 db_status
 if (!notfound) {
        reply += {
-               Reply-Message = "Failure in test at line %interpreter(...line)"
+               Reply-Message = "Failure in test at line %interpreter('...line')"
        }
 }
 
@@ -23,7 +23,7 @@ if (!notfound) {
 #
 if (%db_status() != "notfound") {
        reply += {
-               Reply-Message = "Failure in test at line %interpreter(...line)"
+               Reply-Message = "Failure in test at line %interpreter('...line')"
        }
 }
 
index 13e6d2464535240f60e3e771de8972beb4d8d9c3..a86f98ece6afe28d0d2dadc198f6887782a127f9 100644 (file)
@@ -7,7 +7,7 @@ db_status {
 }
 if (!fail) {
        reply += {
-               Reply-Message = "Failure in test at line %interpreter(...line)"
+               Reply-Message = "Failure in test at line %interpreter('...line')"
        }
 }
 
index f732b35183d112088307b400969e6ef247c76789..a7a9ac70e4e1fdb77d85a0181b1f063eb2dc2029 100644 (file)
@@ -1,8 +1,8 @@
 date test_date1
 date test_date2
 
-test_date1 := "%cipher_rsa.certificate(notBefore)"
-test_date2 := "%cipher_rsa.certificate(notAfter)"
+test_date1 := %cipher_rsa.certificate('notBefore')
+test_date2 := %cipher_rsa.certificate('notAfter')
 
 # Check the cert validity period is 30 days
 if !((test_date2 - test_date1) == ((time_delta) (86400 * 60))) {
index 01cd2025bc8173fe93a50b6a29144bc8ba154b6d..15a7b935ef79df042f749c9b85bb1ed9bd0ca05d 100644 (file)
@@ -2,25 +2,25 @@ Vendor-Specific.FreeRADIUS.Proxied-To := 127.0.0.1
 
 Reply-Message := 'foo'
 
-if (%dict.attr.by_num(1) != 'User-Name') {
+if (%dict.attr.by_num('1') != 'User-Name') {
        test_fail
 }
 
-if (%dict.attr.by_oid(1) != 'User-Name') {
+if (%dict.attr.by_oid('1') != 'User-Name') {
        test_fail
 }
 
 # Should fail
-if (%dict.attr.by_oid(26) != 'Vendor-Specific') {
+if (%dict.attr.by_oid('26') != 'Vendor-Specific') {
        test_fail
 }
 
 # Should fail
-if (%dict.attr.by_oid(26.11344) != 'FreeRADIUS') {
+if (%dict.attr.by_oid('26.11344') != 'FreeRADIUS') {
        test_fail
 }
 
-if (%dict.attr.by_oid(26.11344.1) != 'Proxied-To') {
+if (%dict.attr.by_oid('26.11344.1') != 'Proxied-To') {
        test_fail
 }
 
index 0a6d7cded633c6bba82764351aca857de5d9f62f..08dbe06a4fec9f124ca5dc859c1b3dccb8a2b340 100644 (file)
@@ -1,11 +1,11 @@
 string test_string
 string result_string
 
-if (%aka_sim_id_method("%{User-Name}") != 'AKA') {
+if (%aka_sim_id_method(%{User-Name}) != 'AKA') {
        test_fail
 }
 
-if (%aka_sim_id_type("%{User-Name}") != 'permanent') {
+if (%aka_sim_id_type(%{User-Name}) != 'permanent') {
        test_fail
 }
 
@@ -18,21 +18,21 @@ control.User-Name := %3gpp_temporary_id_encrypt(%{User-Name},%{test_string},6)
 #
 #  0.2 - Can we get the EAP method from the encrypted blob correctly?
 #
-if (%aka_sim_id_method("%{control.User-Name}") != 'AKA') {
+if (%aka_sim_id_method(%{control.User-Name}) != 'AKA') {
        test_fail
 }
 
 #
 #  0.3 - Can we identify the encrypted blob correctly?
 #
-if (%aka_sim_id_type("%{control.User-Name}") != 'pseudonym') {
+if (%aka_sim_id_type(%{control.User-Name}) != 'pseudonym') {
        test_fail
 }
 
 #
 #  0.4 - We should refuse to re-encrypt an encrypted NAI
 #
-if ("%3gpp_temporary_id_encrypt(%{control.User-Name},%{test_string},6)" != '') {
+if (%3gpp_temporary_id_encrypt(%{control.User-Name}, %{test_string}, 6) != '') {
        test_fail
 }
 
@@ -50,7 +50,7 @@ if (result_string != User-Name) {
 #
 if (User-Name =~ /^[0-9](.*)/) {
        request += {
-               User-Name = "%{1}"
+               User-Name = %{1}
                EAP-Type = ::AKA
        }
 }
@@ -60,20 +60,20 @@ if (User-Name =~ /^[0-9](.*)/) {
 #
 test_string := '1420032219455259'
 control += {
-       User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]},%{test_string},6)
+       User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]}, %{test_string}, 6)
 }
 
 #
 #  1.2 - Can we identify the encrypted blob correctly?
 #
-if (%aka_sim_id_type("%{control.User-Name[1]}") != 'pseudonym') {
+if (%aka_sim_id_type(%{control.User-Name[1]}) != 'pseudonym') {
        test_fail
 }
 
 #
 #  1.3 - We should refuse to re-encrypt an encrypted NAI
 #
-if ("%3gpp_temporary_id_encrypt(%{control.User-Name[1]},%{test_string},6)" != '') {
+if (%3gpp_temporary_id_encrypt(%{control.User-Name[1]},%{test_string},6) != '') {
        test_fail
 }
 
@@ -91,27 +91,27 @@ if (result_string != "0%{User-Name[1]}") {
 #
 test_string := '1420032219455259'
 control += {
-       User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]},%{test_string},6,fastauth)
+       User-Name = %3gpp_temporary_id_encrypt(%{User-Name[1]},%{test_string},6,'fastauth')
 }
 
 #
 #  2.2 - Can we identify the encrypted blob correctly?
 #
-if (%aka_sim_id_type("%{control.User-Name[2]}") != 'fastauth') {
+if (%aka_sim_id_type(%{control.User-Name[2]}) != 'fastauth') {
        test_fail
 }
 
 #
 #  2.3 - We should refuse to re-encrypt an encrypted NAI
 #
-if ("%3gpp_temporary_id_encrypt(%{control.User-Name[2]},%{test_string},6,fastauth)" != '') {
+if (%3gpp_temporary_id_encrypt(%{control.User-Name[2]}, %{test_string}, 6, 'fastauth') != '') {
        test_fail
 }
 
 #
 #  2.4 - Get the original IMSI back again
 #
-result_string := %3gpp_temporary_id_decrypt(%{control.User-Name[2]},%{test_string})
+result_string := %3gpp_temporary_id_decrypt(%{control.User-Name[2]}, %{test_string})
 
 if (result_string != "0%{User-Name[1]}") {
        test_fail
index a826f478a25d6342e8e1b527c7c1a9bd483db787..7f36fead1cb65b5d731b5f9f3f0ce5d9a103aa53 100644 (file)
@@ -1,5 +1,5 @@
 # Verify parsing works correctly with an unquoted xlat
-map json %test.passthrough("{ \"foo\":\"bar\" }",{}) {
+map json %test.passthrough("{ \"foo\":\"bar\" }", '{}') {
        Filter-Id := '$.foo'
 }
 
index e065cdc77ffe4156c4b267114da8cc68720922be..26dedf123789ae9638b0f3e92e2c480f1e46768e 100644 (file)
@@ -1,4 +1,4 @@
-if (%test_trigger(test) == false) {
+if (%test_trigger('test') == false) {
        test_fail
 }
 
index a77e87bb72594b237ed38b5ce28738a8af67fd84..57d1d1986d490d64581cada11a02efeb71fced16 100644 (file)
@@ -63,7 +63,7 @@ policy {
 
        test_fail {
                reply += {
-                       Reply-Message = "Failure in test at line %interpreter(...line)"
+                       Reply-Message = "Failure in test at line %interpreter('...line')"
                }
                reject
        }
@@ -72,7 +72,7 @@ policy {
        #  Outputs the contents of the control list in debugging (-X) mode
        #
        debug_control {
-               if("%debug_attr(control)" == '') {
+               if("%debug_attr('control')" == '') {
                        noop
                }
        }
@@ -81,7 +81,7 @@ policy {
        #  Outputs the contents of the request list in debugging (-X) mode
        #
        debug_request {
-               if("%debug_attr(request)" == '') {
+               if("%debug_attr('request')" == '') {
                        noop
                }
        }
@@ -90,7 +90,7 @@ policy {
        #  Outputs the contents of the reply list in debugging (-X) mode
        #
        debug_reply {
-               if("%debug_attr(reply)" == '') {
+               if("%debug_attr('reply')" == '') {
                        noop
                }
        }
@@ -99,7 +99,7 @@ policy {
        #  Outputs the contents of the session state list in debugging (-X) mode
        #
        debug_session_state {
-               if("%debug_attr(session-state)" == '') {
+               if("%debug_attr('session-state')" == '') {
                        noop
                }
        }