From 31037e4744e95493749284bfc156519d6538ceb3 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste Henry Date: Wed, 3 Dec 2025 18:18:02 +0000 Subject: [PATCH] Bug 41292: Rename whitelist to allowlist and add force_password_reset_when_set_by_staff Content-Type: text/plain; charset=utf-8 To test: 1 - Attempt to save a report containing "select force_password_reset_when_set_by_staff from categories" 2 - observe koha prevents this save 3 - apply patch, restart services 4 - repeat step 1 5 - observe your report now saves and runs successfully While adding this new field to the list of allowed fields, I changed "whitelist" to "allowlist" as suggested by the terminology guide: https://wiki.koha-community.org/wiki/Terminology Signed-off-by: David Nind Signed-off-by: Marcel de Rooy --- Koha/Report.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Report.pm b/Koha/Report.pm index be146f214b..b6a210eb9f 100644 --- a/Koha/Report.pm +++ b/Koha/Report.pm @@ -29,8 +29,8 @@ use base qw(Koha::Object); # TODO Koha::Report->store should check this before saving use constant FORBIDDEN_COLUMN_MATCHES => qw(password token uuid secret); -use constant WHITELISTED_COLUMN_NAMES => - qw(password_expiration_date password_expiry_days reset_password change_password min_password_length require_strong_password password_expiration_date); +use constant ALLOWLISTED_COLUMN_NAMES => + qw(password_expiration_date password_expiry_days reset_password change_password min_password_length require_strong_password password_expiration_date force_password_reset_when_set_by_staff); =head1 NAME @@ -99,8 +99,8 @@ sub check_columns { @columns = grep { /$regex/i } @columns; } - # Check for whitelisted variants - $regex = '(^' . ( join '|', WHITELISTED_COLUMN_NAMES ) . ')$'; # should be full match + # Check for allowlisted variants + $regex = '(^' . ( join '|', ALLOWLISTED_COLUMN_NAMES ) . ')$'; # should be full match @columns = grep { !/$regex/i } @columns; return @columns; } -- 2.39.5