summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-02-22 00:45:18 +0000
committerBill Marquette <billm@pfsense.org>2005-02-22 00:45:18 +0000
commit700697582772ffddfd72f2a9e6d17b2230a74468 (patch)
tree4989d43d04b79414440ea617f50d9795f6a2ab39 /usr/local/www/status.php
parent6f300c68da777a4dff317d1d9f85bcda01cd7052 (diff)
downloadpfsense-700697582772ffddfd72f2a9e6d17b2230a74468.zip
pfsense-700697582772ffddfd72f2a9e6d17b2230a74468.tar.gz
Don't disclose SNMP community strings
Diffstat (limited to 'usr/local/www/status.php')
-rwxr-xr-xusr/local/www/status.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/www/status.php b/usr/local/www/status.php
index 6fa1c6c..1835f8d 100755
--- a/usr/local/www/status.php
+++ b/usr/local/www/status.php
@@ -22,9 +22,10 @@ function doCmdT($title, $command) {
if ($fd) {
while (!feof($fd)) {
$line = fgets($fd);
- /* remove password tag contents */
+ /* remove sensitive contents */
$line = preg_replace("/<password>.*?<\\/password>/", "<password>xxxxx</password>", $line);
$line = preg_replace("/<pre-shared-key>.*?<\\/pre-shared-key>/", "<pre-shared-key>xxxxx</pre-shared-key>", $line);
+ $line = preg_replace("/<rocommunity>.*?<\\/rocommunity>/", "<rocommunity>xxxxx</rocommunity>", $line);
$line = str_replace("\t", " ", $line);
echo htmlspecialchars($line,ENT_NOQUOTES);
}
OpenPOWER on IntegriCloud