Several security updates.
This commit is contained in:
parent
1dd74c1dc3
commit
7e63f741c5
3 changed files with 67 additions and 46 deletions
|
|
@ -95,6 +95,17 @@ sub fatalError {
|
|||
exit;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub security {
|
||||
my ($log, $data);
|
||||
$log = FileHandle->new(">>".$session{config}{logfile}) or fatalError("Can't open log file for audit.");
|
||||
$data = localtime(time)." ".$0." SECURITY: ".$session{user}{username}." (".$session{user}{userId}
|
||||
.") connecting from ".$session{env}{REMOTE_ADDR}." attempted to ".$_[0]."\n";
|
||||
print $log $data;
|
||||
$session{debug}{security} .= $data."<p>";
|
||||
$log->close;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub warn {
|
||||
my ($log);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue