Skip to content

Commit

Permalink
Prevent a '|' in supplied input from affecting the squidclamav log
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-p committed Jun 8, 2016
1 parent 8858f45 commit e2a02e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion www/pfSense-pkg-squid/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-pkg-squid
PORTVERSION= 0.4.17
PORTVERSION= 0.4.18
CATEGORIES= www
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
6 changes: 5 additions & 1 deletion www/pfSense-pkg-squid/files/usr/local/www/squid_clwarn.php
Expand Up @@ -53,7 +53,11 @@
$errorreturn = 'This page cannot be displayed';
}

error_log(date("Y-m-d H:i:s") . " | VIRUS FOUND | " . $virus . " | " . $url . " | " . $source . " | " . $user . "\n", 3, "/var/log/c-icap/virus.log");
error_log(date("Y-m-d H:i:s") . " | VIRUS FOUND | "
. str_replace('|', '', $virus) . " | "
. str_replace('|', '', $url) . " | "
. str_replace('|', '', $source) . " | "
. str_replace('|', '', $user) . "\n", 3, "/var/log/c-icap/virus.log");

?>
<style type="text/css">
Expand Down

0 comments on commit e2a02e3

Please sign in to comment.