summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-02-09 15:33:15 -0500
committerScott Ullrich <sullrich@pfsense.org>2011-02-09 15:33:15 -0500
commit652ed95d3d4cfea97610cf4994d86b4f67d8fb4a (patch)
treead8b7956f3e106ad892abda50ff1b8966aae96d1 /usr/local/www
parent8b0041e092274a63002f716515faaa082dfc0693 (diff)
parentc90ba62d265223430663da04e5683ddcf0583fba (diff)
downloadpfsense-652ed95d3d4cfea97610cf4994d86b4f67d8fb4a.zip
pfsense-652ed95d3d4cfea97610cf4994d86b4f67d8fb4a.tar.gz
Merge remote branch 'upstream/master'
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/crash_reporter.php28
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php2
-rwxr-xr-xusr/local/www/index.php22
-rwxr-xr-xusr/local/www/services_captiveportal.php3
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php2
5 files changed, 34 insertions, 23 deletions
diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php
index c75fe72..8b03936 100755
--- a/usr/local/www/crash_reporter.php
+++ b/usr/local/www/crash_reporter.php
@@ -42,19 +42,24 @@ require("guiconfig.inc");
require("functions.inc");
require("captiveportal.inc");
+define("FILE_SIZE", 450000);
+
function upload_crash_report($files) {
+ global $g;
$post = array();
$counter = 0;
foreach($files as $file) {
- $post["file{$counter}"] = "@{$file}";
- $counter++;
+ if(filesize($cf) < FILE_SIZE) {
+ $post["file{$counter}"] = "@{$file}";
+ $counter++;
+ }
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)");
- curl_setopt($ch, CURLOPT_URL, "http://crashreporter.pfsense.org/crash_reporter.php");
+ curl_setopt($ch, CURLOPT_URL, $g['crashreporterurl']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
@@ -71,8 +76,8 @@ function output_crash_reporter_html($crash_reports) {
echo gettext("Contents of crash reports") . ":<br/>";
echo "<textarea readonly rows='40' cols='65' name='crashreports'>{$crash_reports}</textarea>";
echo "<p/>";
- echo "<input name=\"Submit\" type=\"submit\" class=\"formbtn\" value=\"" . gettext("Yes") . "\">";
- echo "<input name=\"Submit\" type=\"submit\" class=\"formbtn\" value=\"" . gettext("No") . "\">";
+ echo "<input name=\"Submit\" type=\"submit\" class=\"formbtn\" value=\"" . gettext("Yes") . "\">" . gettext(" - Submit this to the developers for inspection");
+ echo "<p/><input name=\"Submit\" type=\"submit\" class=\"formbtn\" value=\"" . gettext("No") . "\">" . gettext(" - Just delete the crash report and take me back to the Dashboard");
echo "<p/>";
echo "</form>";
}
@@ -102,13 +107,12 @@ $crash_report_header .= "\nCrash report details:\n";
$files_to_upload = glob("/var/crash/*");
echo "<p/>";
echo gettext("Uploading...");
- echo "<p/>";
if(is_array($files_to_upload)) {
$resp = upload_crash_report($files_to_upload);
- print_r($resp);
exec("rm /var/crash/*");
- echo gettext("Crash files have been submitted for inspection.");
- echo "<p/><a href='/'>" . gettext("Continue") . "</a>" . gettext(" and delete crash report files.");
+ echo "<p/>";
+ print_r($resp);
+ echo "<p/><a href='/'>" . gettext("Continue") . "</a>" . gettext(" and delete crash report files from local disk.");
} else {
echo "Could not find any crash files.";
}
@@ -121,8 +125,10 @@ $crash_report_header .= "\nCrash report details:\n";
$crash_reports .= $crash_report_header;
if(is_array($crash_files)) {
foreach($crash_files as $cf) {
- $crash_reports .= "\nFilename: {$cf}\n";
- $crash_reports .= file_get_contents($cf);
+ if(filesize($cf) < FILE_SIZE) {
+ $crash_reports .= "\nFilename: {$cf}\n";
+ $crash_reports .= file_get_contents($cf);
+ }
}
} else {
echo "Could not locate any crash data.";
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 736b362..77933df 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -295,6 +295,8 @@ if ($_POST) {
// Firewall rules
update_alias_names_upon_change('filter', 'rule', 'source', 'address', $_POST['name'], $origname);
update_alias_names_upon_change('filter', 'rule', 'destination', 'address', $_POST['name'], $origname);
+ update_alias_names_upon_change('filter', 'rule', 'source', 'port', $_POST['name'], $origname);
+ update_alias_names_upon_change('filter', 'rule', 'destination', 'port', $_POST['name'], $origname);
// NAT Rules
update_alias_names_upon_change('nat', 'rule', 'source', 'address', $_POST['name'], $origname);
update_alias_names_upon_change('nat', 'rule', 'source', 'port', $_POST['name'], $origname);
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 43520ba..92376e5 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -56,17 +56,19 @@ require_once('functions.inc');
require_once('guiconfig.inc');
require_once('notices.inc');
-// Check to see if we have a crash report
-$crash = glob("/var/crash/*");
-$x = 0;
-$skip_files = array(".", "..", "minfree", "");
-if(is_array($crash)) {
- foreach($crash as $c) {
- if (!in_array(basename($c), $skip_files))
- $x++;
+if($g['disablecrashreporter'] != true) {
+ // Check to see if we have a crash report
+ $crash = glob("/var/crash/*");
+ $x = 0;
+ $skip_files = array(".", "..", "minfree", "");
+ if(is_array($crash)) {
+ foreach($crash as $c) {
+ if (!in_array(basename($c), $skip_files))
+ $x++;
+ }
+ if($x > 0)
+ $savemsg = "{$g['product_name']} has detected a crash report. Click <a href='crash_reporter.php'>here</a> for more information.";
}
- if($x > 0)
- $savemsg = "{$g['product_name']} has detected a crash report. Click <a href='crash_reporter.php'>here</a> for more information.";
}
##build list of widgets
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index 8d12c7c..faaeb37 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -82,6 +82,7 @@ $pconfig['radmac_secret'] = $config['captiveportal']['radmac_secret'];
$pconfig['reauthenticate'] = isset($config['captiveportal']['reauthenticate']);
$pconfig['reauthenticateacct'] = $config['captiveportal']['reauthenticateacct'];
$pconfig['httpslogin_enable'] = isset($config['captiveportal']['httpslogin']);
+$pconfig['httpsname'] = $config['captiveportal']['httpsname'];
$pconfig['preauthurl'] = strtolower($config['captiveportal']['preauthurl']);
$pconfig['cert'] = base64_decode($config['captiveportal']['certificate']);
$pconfig['cacert'] = base64_decode($config['captiveportal']['cacertificate']);
@@ -583,7 +584,7 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td>
</tr>
<tr>
- <td class="vncell" valign="top"><?=gettext("Radius ip attribute"); ?></td>
+ <td class="vncell" valign="top"><?=gettext("RADIUS NAS IP attribute"); ?></td>
<td>
<select name="radiussrcip_attribute" id="radiussrcip_attribute">
<?php $iflist = get_configured_interface_with_descr();
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index 1b9683a..dfc85c1 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -38,7 +38,7 @@ require_once("guiconfig.inc");
require_once('notices.inc');
if($_REQUEST['getupdatestatus']) {
- if(isset($curcfg['alturl']['enable']))
+ if(isset($config['system']['firmware']['alturl']['enable']))
$updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
else
$updater_url = $g['update_url'];
OpenPOWER on IntegriCloud