Bugzilla – Attachment 190201 Details for
Bug 41292
Add "force_password_reset_when_set_by_staff" to the allowed column name list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41292: Rename whitelist to allowlist and add force_password_reset_when_set_by_staff
Bug-41292-Rename-whitelist-to-allowlist-and-add-fo.patch (text/plain), 2.09 KB, created by
Marcel de Rooy
on 2025-12-05 10:36:16 UTC
(
hide
)
Description:
Bug 41292: Rename whitelist to allowlist and add force_password_reset_when_set_by_staff
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-12-05 10:36:16 UTC
Size:
2.09 KB
patch
obsolete
>From 31037e4744e95493749284bfc156519d6538ceb3 Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >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 <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41292
:
190128
|
190130
| 190201