Commit Graph

31803 Commits

Author SHA1 Message Date
PiBa-NL
81fb072cb0 webgui tables, doubleclick event to perform 'edit' action, part 2
(cherry picked from commit 1c10ce9750)
2016-07-04 10:06:04 -04:00
PiBa-NL
d98272bcde webgui tables, doubleclick event to perform 'edit' action
(cherry picked from commit 54691fc663)
2016-07-03 16:35:08 -04:00
PiBa-NL
1380f02324 ipsec widget, check for valid array
(cherry picked from commit 658180daff)
2016-07-03 13:50:51 -04:00
BBcan177
cba6dcbbb7 Update system_usermanager_settings.php
Use of undefined constant min - assumed 'min'
2016-07-01 16:49:48 -05:00
BBcan177
588486b8fd Update system_crlmanager.php
Use of undefined constant min - assumed 'min'
Use of undefined constant max - assumed 'max'
2016-07-01 16:49:48 -05:00
BBcan177
86a80b0908 Fix undefined constant
Notice: Use of undefined constant min - assumed 'min' 
Notice: Use of undefined constant max - assumed 'max'
2016-07-01 16:49:48 -05:00
NOYB
237eb3d9a7 Diag Tables Last Update
Use correct Thursday abbreviation (s/Thr/Thu/).
2016-06-30 18:32:23 -05:00
Phil Davis
d0acb088cb Handle more invalid IPv6 formats 2016-06-30 00:01:50 -05:00
Chris Buechler
cd23382805 Add playback files for disabling and enabling CARP maintenance mode. Ticket #6560 2016-06-29 22:26:46 -05:00
Chris Buechler
5f37baed48 Omit <secret> tags from L2TP in status.php config.xml dump. 2016-06-29 19:49:45 -05:00
Chris Buechler
c6060e225b Restore 2.2.x and prior means of obtaining pfsync nodes to avoid exhausting memory on systems with large state tables. Ticket #6364 2016-06-29 19:42:23 -05:00
Daniel Hoffend
69eca02c01 Shorten gwifip if whole socket path exceeds 100 chars
dpinger stopps with an error when the socketname exceeds over
(around) 100 characters. The dpinger will not start and not deliver
monitoring results to the WebUI.

These long socket names can get created when using link-local addresses
and long gateway names / interface scopes.

See Ticket 6505
2016-06-28 21:13:47 -05:00
Daniel Hoffend
dca9eafb0e Use a different delimiter for dpinger socket names
Currently underscores are used to seperate gwifip, monitorip, etc, but
underscors are also used in vlan subinterfaces like em0_vlan10 and
therefore can't be used because the interface scope is appended to IPv6
link-local addresses.
2016-06-28 21:13:44 -05:00
Chris Buechler
ba2c8ed46b Set pipe_slot_limit to the maximum configured qlimit value. Move the set_sysctl out if the block where it only gets run if dummynet isn't already loaded. Ticket #6553 2016-06-28 15:45:47 -05:00
Chris Buechler
1b8aa9c865 Clean up limiter text. Remove old commented out bit. 2016-06-28 15:05:35 -05:00
Phil Davis
426b7b0c6f Fix matching of chars in IPv6 address segments
The existing regex here is wrong, it matches 0 or more of the hex digits but then there can be other rubbish in the string, in fact anything at all! It matches "az", "z", "qwerty" and so on. So the "return false" inside this "if" never happens.
In most cases the later code catches problems, because it converts the string from hex to decimal (and things like "z" end up as decimal 0), then it does some back-conversion of the answer to hex and realizes something is different and so does not count the entry as one of the needed 8 valid segments of the IPv6 address.
This goes wrong if the user supplies a string with 8 valid IPv6 hex pieces and 1 or more extra invalid ones anywhere in the list. In that case the code finds 8 good chunks and thinks that all is well.
Try using the pfSense is_ipaddrv6() with strings like:
$ipaddr = "1:2:3:4:5:6:7:z:a";
$ret = is_ipaddrv6($ipaddr);
var_dump($ret);

That returns true - which is not good!

You can put the invalid items anywhere you like, as long as you have 8 valid items, such as:
"1:2:3:xy:4:5:6:7:8"
"gh:1:2:3:xy:4:5:6:7:8"
"1:2:3:xy:4:5:6:7:8:qw"

This change makes this initial validity check on the characters actually work, so it avoids the later code having to deal with that at all.
(cherry picked from commit 8a950b3c37)
2016-06-28 08:52:03 -04:00
Phil Davis
a88f0ee6b5 Remove a-f from IPv4 address pattern
It seems to me that a through f should not be part of the pattern for the "V4" case.
(cherry picked from commit 1f49dd8a3a)
2016-06-28 08:49:54 -04:00
Phil Davis
71d3c2f752 Always use require_once
The usage of require() and require_once() throughout the system is
inconsistent, and "bugs" come up now and then when the order of
"requires" is a bit different and some require() happens after the
include file is already included/required.
It seems to me that there is no harm at all in always using
require_once().
2016-06-27 14:16:30 -05:00
jim-p
7943b6a7ed Run generate-privdefs.php to update priv.defs.inc 2016-06-27 11:00:08 -04:00
Chris Buechler
51e30c400b Use the translated destination for kill_states if one exists. Ticket #6531 2016-06-24 23:02:08 -05:00
Chris Buechler
ebb1e0a593 Correct/clarify column header. Ticket #6530 2016-06-24 22:23:29 -05:00
Chris Buechler
4e658db244 Fix style 2016-06-24 22:20:20 -05:00
Chris Buechler
e565e94981 pfSense_get_pf_states always returns source as src and dest as dst, this flipping based on direction is wrong. Ticket #6530 2016-06-24 22:19:04 -05:00
Chris Buechler
84c7a8f3c3 Fix style 2016-06-24 21:59:30 -05:00
Denny Page
2556e62338 Add include of functions.inc for declaration of gettext 2016-06-24 19:07:37 -05:00
Chris Buechler
412a9cd026 Include interface scope on IPv6 static routes to link local gateway IPs. Ticket #6506 2016-06-24 01:36:02 -05:00
Stephen Beaver
72a6e5d071 Comment typo
(cherry picked from commit b069f77e0a)
2016-06-23 22:22:56 -04:00
Chris Buechler
bc54d32da7 Revert "adding privileges and separating DNS Resolver overrides from general settings"
This reverts commit fc76a1e390.
2016-06-23 17:21:46 -05:00
NOYB
7b45ec858d Shouldn't the priv match here be set to "services_rfc2136_edit.php*"?
(cherry picked from commit 5c403f8432)
2016-06-23 13:35:38 -04:00
Phil Davis
c0b34e4ce0 Load actual value of webguihostnamemenu
This is a string from a list of valid values (empty, "hostonly", "fqdn"). So it is not correct to just gather a true/false value here.
(cherry picked from commit e93242eb2a)
2016-06-23 13:33:31 -04:00
Stephen Beaver
9c025aa561 Restored countdown functionality and menu refresh on successful update/remove/install
Added comments to clarify operation of the page

(cherry picked from commit 18295ff2f9)
2016-06-23 13:31:29 -04:00
Chris Buechler
0ce30f4a67 Clarify ports alias hint. Ticket #6523 2016-06-22 20:07:52 -05:00
jim-p
de1d4101df % and / are also allowed in values 2016-06-22 12:32:48 -04:00
NewEraCracker
bb44b41af0 Fix Bug #6394 - Incorrect Output of Translation
Apparently gettext() does not behave correctly when passed an empty string, this commit ensures gettext() is called only with non-empty strings

(cherry picked from commit 6ae99aba5c)
2016-06-22 11:57:52 -04:00
NOYB
a8ed54b4bf Remove duplicate listtags() entry 'member'.
(cherry picked from commit 40d7e4bee9)
2016-06-22 11:55:14 -04:00
stilez
76a56fcee5 Remove subnet_expand()
Function isn't used in main or packages repo, and in any case would need a complete rewrite to handle IPv6.
(cherry picked from commit 6215902c40)
2016-06-22 11:48:16 -04:00
Phil Davis
8c51280105 Fix #6482 OpenVPN Redirect Gateway Option Causes GUI Issue
This fixes the GUI inconsistency reported in the referenced bug. On edit of an OpenVPN server that has tun mode, not shared key, and the gwredir checkbox checked, the local_network fields are shown, but actually they should be hidden (because that is what happens on first data entry when gwredir is checked).
At least this makes the GUI consistent. Then the other issues mentioned in Redmine feature 6483 can be addressed separately.
(cherry picked from commit fa20dac1b5)
2016-06-22 11:45:32 -04:00
hailthemelody
4a89ba6158 added missing div.content wrapper when reloading filters
(cherry picked from commit e8406abe62)
2016-06-22 11:43:54 -04:00
NewEraCracker
2031be9ce3 Fix PHP Warning about invalid argument supplied for foreach
If _POST['members'] or _POST['groups'] is not set / none selected at GUI, it would give a warning on crash reporter (dev versions)

(cherry picked from commit 9f4722022f)
2016-06-22 11:41:27 -04:00
NewEraCracker
50264b5847 Fix bad escapeshellarg logic on mpd execution
With this change single-quotes are applied in correct places

(cherry picked from commit 08cd022545)
2016-06-22 11:39:20 -04:00
Phil Davis
4125445f98 Do not allow deleting your own user name
Currently if you delete your own user name, then the config ends up with a blank user tag in it. Rather than fix that up, it seems dangerous to be able to delete yourself anyway, because if you are the last user with admin privs for which you know the password (i.e. if you have not recorded the password for "admin" somewhere), then you can lock yourself out. That would require console access to fix, which for some people is a pain.
It seems reasonable to me to make the person login as some other user with admin privs to delete "themselves".
Bit of boots and braces done here:
1) Don't show the trash bin icon for "yourself", and also disable the delete_check checkbox. So you can't opt to delete yourself from the ordinary front-end GUI.
2) Enhance the back-end validation to prevent deleting yourself, just in case someone mucks about in the front-end code.
3) Put error messages to tell people when something is not deleted, and why.
4) In the success message for multi-deletion, tell which user names have actually been deleted.
(cherry picked from commit d6b79c398d)
2016-06-22 11:32:06 -04:00
stilez
07b8134dd0 missing "("
(cherry picked from commit 70381d4803)
2016-06-22 11:23:26 -04:00
stilez
3bea132198 optional arg for old behaviour
(cherry picked from commit cf63f1638a)
2016-06-22 11:23:24 -04:00
stilez
d65d58a794 function name hms -> dhms
to match edit to util.inc
(cherry picked from commit c57e936a65)
2016-06-22 11:23:22 -04:00
stilez
f2f86310b5 Simplify convert_seconds_to_hms() and show days for large numbers of hours
1) Function can be simplified and all "if" statements removed, using intdiv (or casting result as int for PHP < 7) and % for calcs and sprintf for padding.
2) Input validity check before trying to convert format
3) If time represented is large (eg uptime might be several months) then hours becomes unhelpful, it's clearer to show "4921:02:06" as "205d 01:02:06". (Leading "days" value not shown unless >=1 for simplicity)
(cherry picked from commit 0bde6d1057)
2016-06-22 11:23:20 -04:00
stilez
53c20c1753 Add "delete entry" for ARP table
Useful function in some circumstances - seems no reason not to have it.

Uses IP rather than hostname since not all ARP entries have hostnames.

Probably should also have "delete all" but not done that.
(cherry picked from commit 6ea0d41e3c)
2016-06-22 11:17:34 -04:00
NewEraCracker
d162670633 Fix NTP PPS. It had 'None' option available on 2.2.x.
(cherry picked from commit ceabd66d57)
2016-06-22 11:15:00 -04:00
NewEraCracker
2a68fcd333 Fix "Unable to remove NTP GPS from configuration"
https://forum.pfsense.org/index.php?topic=112771.msg627573
(cherry picked from commit 55de528cbb)
2016-06-22 11:14:59 -04:00
stilez
cfa9a5be7d redundant check - is_numericint() tests for >= 0
(cherry picked from commit f208e9690e)
2016-06-22 11:13:10 -04:00
stilez
caed078357 Use global backup count instead of hardcoded value and remove redundant function
(cherry picked from commit 01b5410ae8)
2016-06-22 11:13:08 -04:00