From f257c139312002e38468012137f93eb8230cec38 Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 27 Jun 2011 14:42:25 -0400 Subject: Don't do a csrf check when downloading packet capture, see http://forum.pfsense.org/index.php/topic,37794.0.html - also exit after sending the file to the user to avoid partial broken page loads after downloading a packet capture. --- usr/local/www/diag_packet_capture.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php index 2ffba1d..df482e2 100644 --- a/usr/local/www/diag_packet_capture.php +++ b/usr/local/www/diag_packet_capture.php @@ -35,6 +35,9 @@ ##|*MATCH=diag_packet_capture.php* ##|-PRIV +if ($_POST['downloadbtn'] == gettext("Download Capture")) + $nocsrf = true; + $pgtitle = array(gettext("Diagnostics"), gettext("Packet Capture")); require_once("guiconfig.inc"); require_once("pfsense-utils.inc"); @@ -92,6 +95,7 @@ if ($_POST) { header("Content-Disposition: attachment; filename=$fn"); header("Content-Length: $fs"); readfile($fp.$fn); + exit; } } else { $do_tcpdump = false; -- cgit v1.1 From b0d6223f89007156e93fa6bb76fe92f9300b11b3 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 27 Jun 2011 19:01:43 +0000 Subject: When editing a vlan and chaning its tag id and the vlan is assigned correct even the interface name of the assignment otherwise we result in breaking the install. --- usr/local/www/interfaces_vlan_edit.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php index 08f1a53..b6cea47 100755 --- a/usr/local/www/interfaces_vlan_edit.php +++ b/usr/local/www/interfaces_vlan_edit.php @@ -98,11 +98,16 @@ if ($_POST) { if (!$input_errors) { if (isset($id) && $a_vlans[$id]) { if (($a_vlans[$id]['if'] != $_POST['if']) || ($a_vlans[$id]['tag'] != $_POST['tag'])) { - if (!empty($a_vlans[$id]['vlanif'])) + if (!empty($a_vlans[$id]['vlanif'])) { + $confif = convert_real_interface_to_friendly_interface_name($vlan['vlanif']); // Destroy previous vlan pfSense_interface_destroy($a_vlans[$id]['vlanif']); - else + } else { pfSense_interface_destroy("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + $confif = convert_real_interface_to_friendly_interface_name("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + } + if ($confif <> "") + $config['interfaces'][$confif]['if'] = "{$_POST['if']}_vlan{$_POST['tag']}"; } } $vlan = array(); @@ -122,7 +127,6 @@ if ($_POST) { write_config(); - $confif = convert_real_interface_to_friendly_interface_name($vlan['vlanif']); if ($confif <> "") interface_configure($confif); -- cgit v1.1 From ca1a3fc230880beae13ea37c2f71218951eb622e Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 27 Jun 2011 20:43:58 +0000 Subject: Clean up leftover code not needed for anything. --- usr/local/www/services_captiveportal_hostname_edit.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/services_captiveportal_hostname_edit.php b/usr/local/www/services_captiveportal_hostname_edit.php index a199341..cc09459 100755 --- a/usr/local/www/services_captiveportal_hostname_edit.php +++ b/usr/local/www/services_captiveportal_hostname_edit.php @@ -118,17 +118,11 @@ if ($_POST) { $ip['bw_up'] = $_POST['bw_up']; if ($_POST['bw_down']) $ip['bw_down'] = $_POST['bw_down']; - if (isset($id) && $a_allowedhostnames[$id]) { - $oldip = $a_allowedhostnames[$id]['hostname']; - if (!empty($a_allowedhostnames[$id]['sn'])) - $oldip .= "/{$a_allowedhostnames[$id]['sn']}"; + if (isset($id) && $a_allowedhostnames[$id]) $a_allowedhostnames[$id] = $ip; - } else { - $oldip = $ip['hostname']; - if (!empty($$ip['sn'])) - $oldip .= "/{$$ip['sn']}"; + else $a_allowedhostnames[] = $ip; - } + allowedhostnames_sort(); write_config(); -- cgit v1.1 From 48f55356be998abeed4a0f257dbd3ffd8e40bfdb Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Tue, 28 Jun 2011 11:03:54 +0200 Subject: Consistency of NOTE vs Note as through the rest of the webGUI. --- usr/local/www/system_advanced_admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www') diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php index 4965fb9..d1150a2 100644 --- a/usr/local/www/system_advanced_admin.php +++ b/usr/local/www/system_advanced_admin.php @@ -267,7 +267,7 @@ function prot_change() {
-   +  
-- cgit v1.1 From 9338cf353e6e707788674ef37a4ba436dde868c3 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Tue, 28 Jun 2011 12:59:01 +0200 Subject: Note consistency and gettext() added. --- usr/local/www/system_certmanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www') diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php index 355621b..6b0d81e 100644 --- a/usr/local/www/system_certmanager.php +++ b/usr/local/www/system_certmanager.php @@ -955,7 +955,7 @@ function internalca_change() {   - NOTE: You can only delete a certificate if it is not currently in use. + -- cgit v1.1 From beaab62274becfd51117d6f84d7b2db93c89b80e Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Tue, 28 Jun 2011 13:10:24 +0200 Subject: More text consistency. --- usr/local/www/system_authservers.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php index fad6b34..b6b1097 100644 --- a/usr/local/www/system_authservers.php +++ b/usr/local/www/system_authservers.php @@ -543,9 +543,9 @@ function select_clicked() { "> -
-
-
+
+
+
-- cgit v1.1 From 03d7297b79edb65b79a76c9ea56db793bd5bbf94 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Tue, 28 Jun 2011 15:17:03 +0200 Subject: Use correct table header class. --- usr/local/www/diag_routes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_routes.php b/usr/local/www/diag_routes.php index f8e2926..2a61223 100644 --- a/usr/local/www/diag_routes.php +++ b/usr/local/www/diag_routes.php @@ -86,7 +86,7 @@ include('head.inc'); $name = ($tabindex == 0 ? 'IPv4' : 'IPv6'); ?> - + $line) { if ($i == 0) continue; -- cgit v1.1 From 9ed6c9ac73a7610dbc90e063ba665cd9aa569279 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Tue, 28 Jun 2011 16:22:49 +0200 Subject: Make text cosmetics consistent and close off missing tag. --- usr/local/www/diag_traceroute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_traceroute.php b/usr/local/www/diag_traceroute.php index 6c9df57..91736df 100755 --- a/usr/local/www/diag_traceroute.php +++ b/usr/local/www/diag_traceroute.php @@ -114,7 +114,7 @@ if (!isset($do_traceroute)) {
-

+

"; echo("
" . gettext("Traceroute output:") . "
"); @@ -133,7 +133,7 @@ if (!isset($do_traceroute)) {

  - +
-- cgit v1.1 From e8c8891d0c787f656bc5147b4fac21f3e2746b8a Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 28 Jun 2011 11:19:08 -0400 Subject: Fix typo --- usr/local/www/system_advanced_misc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www') diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php index 2264365..c31bc92 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -339,7 +339,7 @@ function maxmss_checked(obj) { - + /> -- cgit v1.1