|
Lines 29-36
use base qw(Koha::Object);
Link Here
|
| 29 |
# TODO Koha::Report->store should check this before saving |
29 |
# TODO Koha::Report->store should check this before saving |
| 30 |
|
30 |
|
| 31 |
use constant FORBIDDEN_COLUMN_MATCHES => qw(password token uuid secret); |
31 |
use constant FORBIDDEN_COLUMN_MATCHES => qw(password token uuid secret); |
| 32 |
use constant WHITELISTED_COLUMN_NAMES => |
32 |
use constant ALLOWLISTED_COLUMN_NAMES => |
| 33 |
qw(password_expiration_date password_expiry_days reset_password change_password min_password_length require_strong_password password_expiration_date); |
33 |
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); |
| 34 |
|
34 |
|
| 35 |
=head1 NAME |
35 |
=head1 NAME |
| 36 |
|
36 |
|
|
Lines 99-106
sub check_columns {
Link Here
|
| 99 |
@columns = grep { /$regex/i } @columns; |
99 |
@columns = grep { /$regex/i } @columns; |
| 100 |
} |
100 |
} |
| 101 |
|
101 |
|
| 102 |
# Check for whitelisted variants |
102 |
# Check for allowlisted variants |
| 103 |
$regex = '(^' . ( join '|', WHITELISTED_COLUMN_NAMES ) . ')$'; # should be full match |
103 |
$regex = '(^' . ( join '|', ALLOWLISTED_COLUMN_NAMES ) . ')$'; # should be full match |
| 104 |
@columns = grep { !/$regex/i } @columns; |
104 |
@columns = grep { !/$regex/i } @columns; |
| 105 |
return @columns; |
105 |
return @columns; |
| 106 |
} |
106 |
} |
| 107 |
- |
|
|