From: Nick Porter Date: Thu, 19 Sep 2024 09:29:56 +0000 (+0100) Subject: Verify that list changes aren't copied back X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=342be74762fd04bf221bf156805f87ac20fc9d32;p=thirdparty%2Ffreeradius-server.git Verify that list changes aren't copied back --- diff --git a/src/tests/modules/perl/auth.unlang b/src/tests/modules/perl/auth.unlang index 89bd6a6abc9..661c394db47 100644 --- a/src/tests/modules/perl/auth.unlang +++ b/src/tests/modules/perl/auth.unlang @@ -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[*] diff --git a/src/tests/modules/perl/test.pl b/src/tests/modules/perl/test.pl index a17913d0609..9ada2d3ec95 100644 --- a/src/tests/modules/perl/test.pl +++ b/src/tests/modules/perl/test.pl @@ -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; }