summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 94f21142..c9af2d1e 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -317,12 +317,13 @@ sub set_cookie {
sub redirect {
my ($self, $msg) = @_;
+ use List::Util qw(first);
if ($self->{callback}) {
my ($script, $argv) = split(/\?/, $self->{callback});
$self->error($locale->text("Invalid redirect")) unless
- grep {/$script/} @{LedgerSMB::Sysconfig::scripts};
+ first {$_ eq $script} @{LedgerSMB::Sysconfig::scripts};
exec ("perl", $script, $argv);
} else {