summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-08 02:18:15 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-08 02:18:15 +0000
commit30cec9d5d70535d7a30029a3854adbcf8019b13a (patch)
treed8148d1e4fc78170b5c8365035063bc99baa57e9 /LedgerSMB
parenta9059536ea29e53bc0ae2c322532eac1a9ef558c (diff)
Fix edge cases of redirect whitelisting
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@495 4979c152-3d1c-0410-bac9-87ea11338e46
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 {