Test allowed select values (#19786)
This commit is contained in:
parent
3f1f5c880c
commit
54f41f10ea
|
@ -631,7 +631,7 @@ sub _dispatchAttributes {
|
|||
|
||||
sub _removeKeys {
|
||||
my ( $self, $attrs, $hidden, $msg, $mask ) = @_;
|
||||
my $regex = join '|', split /\s+/, $hidden;
|
||||
my $regex = '^(?:' . join( '|', split( /\s+/, $hidden ) ) . ')';
|
||||
my @keys = grep /$regex/, keys %$attrs;
|
||||
|
||||
$self->logger->debug($msg);
|
||||
|
|
|
@ -88,9 +88,17 @@ sub retreiveFindUserParams {
|
|||
|
||||
$self->logger->debug("FindUser: reading parameters...");
|
||||
@$searching = map {
|
||||
my $key = ( split '#', $_ )[0];
|
||||
my $value = $req->params($key) // '';
|
||||
if ( $value =~ /$self->{conf}->{findUserControl}/o ) {
|
||||
my $regex = '\w+';
|
||||
my $key = ( split '#', $_ )[0];
|
||||
my $value = $req->params($key) // '';
|
||||
my @values = split $self->conf->{multiValuesSeparator},
|
||||
$self->conf->{findUserSearchingAttributes}->{$_} || '';
|
||||
$regex = '^(?:' . join( '|', split( /\s+/, @values ) ) . ')$'
|
||||
if scalar @values > 1;
|
||||
|
||||
if ( $value =~ /$regex/o
|
||||
&& $value =~ /$self->{conf}->{findUserControl}/o )
|
||||
{
|
||||
$self->logger->debug("Push searching parameter: $key => $value");
|
||||
{ key => $key, value => $value };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user