Harmonize regex (#2657)

This commit is contained in:
Christophe Maudoux 2021-11-16 22:45:25 +01:00
parent 213e58b572
commit 5ffd909d7d
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ sub build_jail {
$self->useSafeJail(1) unless defined $self->useSafeJail;
if ($require) {
foreach my $f ( split /[, ]+/, $require ) {
foreach my $f ( split /[,\s]+/, $require ) {
if ( $f =~ /^[\w\:]+$/ ) {
eval "require $f";
}
@ -63,7 +63,7 @@ sub build_jail {
if ($build) {
@builtCustomFunctions =
$self->customFunctions ? split( /\s+/, $self->customFunctions ) : ();
$self->customFunctions ? split( /[,\s]+/, $self->customFunctions ) : ();
foreach (@builtCustomFunctions) {
no warnings 'redefine';
$api->logger->debug("Custom function: $_");

View File

@ -96,7 +96,7 @@ sub enabledPlugins {
# Check if custom plugins are required
if ( $conf->{customPlugins} ) {
$self->logger->debug( 'Custom plugins: ' . $conf->{customPlugins} );
push @res, grep ( /\w+/, split( /,\s*/, $conf->{customPlugins} ) );
push @res, grep ( /\w+/, split( /[,\s]+/, $conf->{customPlugins} ) );
}
# Impersonation overwrites req->step and pops 'afterData' EP.