]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Verify that list changes aren't copied back
authorNick Porter <nick@portercomputing.co.uk>
Thu, 19 Sep 2024 09:29:56 +0000 (10:29 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 23 Sep 2024 10:50:25 +0000 (11:50 +0100)
src/tests/modules/perl/auth.unlang
src/tests/modules/perl/test.pl

index 89bd6a6abc92b8f000bb5d6a5ce0bd4f820be6e6..661c394db477a8dfc5247aa7448735c1c3a679c7 100644 (file)
@@ -28,6 +28,14 @@ if (!ok) {
 if !(&reply.Filter-Id == 'Hello') {
        test_fail
 }
+# Verify that the change to the request and control lists are
+# not copied back.
+if (&User-Name != 'bob') {
+       test_fail
+}
+if (&control.NAS-Identifier) {
+       test_fail
+}
 
 &reply -= &Vendor-Specific.Cisco.h323-credit-amount[*]
 &reply -= &Filter-Id[*]
index a17913d0609d5f92fd73b762d533fa454b70087f..9ada2d3ec9514689e111aa27ad35ff215bea55eb 100644 (file)
@@ -78,7 +78,9 @@ sub authenticate {
                        $RAD_REPLY{'Filter-Id'} = 'Everything'
                } else {
 #                      $RAD_REPLY{'Vendor-Specific.Cisco.h323-credit-amount'} = "100";
-                       $RAD_REPLY{'Filter-Id'} = 'Hello'
+                       $RAD_REPLY{'Filter-Id'} = 'Hello';
+                       $RAD_REQUEST{'User-Name'} = 'tim';
+                       $RAD_CONFIG{'NAS-Identifier'} = 'dummy';
                }
                return RLM_MODULE_OK;
        }