Skip to content

Commit

Permalink
Merge branch 'master' of ssh://git.icdevgroup.org/var/git/interchange
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christensen committed Jul 17, 2014
2 parents b7ee9b8 + ca82c6e commit 44f5e44
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/Vend/Error.pm
Expand Up @@ -186,25 +186,19 @@ sub do_lockout {
# Now we log the error after custom lockout routine gets chance
# to bypass
my $pause = $::Limit->{lockout_reset_seconds} || 30;
$msg = errmsg(
"WARNING: POSSIBLE BAD ROBOT. %s accesses with no %d second pause.",
$Vend::Session->{accesses},
$pause,
);
::logError($msg);
my $msg_string = "WARNING: POSSIBLE BAD ROBOT. %s accesses with no %d second pause.";
::logError($msg_string, $Vend::Session->{accesses}, $pause);

if($cmd = $Global::LockoutCommand) {
my $host = $CGI::remote_addr;
$cmd =~ s/%s/$host/ or $cmd .= " $host";
$msg .= errmsg("Performing lockout command '%s'", $cmd);
system $cmd;
$msg .= errmsg("\nBad status %s from '%s': %s\n", $?, $cmd, $!)
if $?;
$? and $msg .= "\n" . errmsg("Bad status %s from '%s': %s\n", $?, $cmd, $!);
logGlobal({level => 'notice'}, $msg);
}
$Vend::Cfg->{VendURL} = $Vend::Cfg->{SecureURL} = 'http://127.0.0.1';
$Vend::LockedOut = 1;
logError($msg) if $msg;
return;
}

Expand Down

0 comments on commit 44f5e44

Please sign in to comment.