Commit Graph

32850 Commits

Author SHA1 Message Date
stilez
39dc4fc510 Various updates to PR
1) convert echo to print, and add infobox, as requested in PR comments
2) If no identifiable line number, say so
3) EVAL gives an error message format that wasn't picked up, it is now. Test case - enter as the code:  eval("X");
4) Warn that EVAL gives a "spurious" "error at line 1" as well, the real error is in the (...). See above test case for this.
5) Simplify translators' job a bit
6) Try to reduce errors in user code giving NOTICES (see PR comments). Start by defining a dir for user code (only) and putting code in it.
(cherry picked from commit 1155cd6318)
2017-05-29 15:20:46 -03:00
stilez
ad6be377ed create global for user code dir, in diag_command.php
Going to try and stop user code generating notices, by putting it in a specific dir which doesn't give notices for syntax errors.
(cherry picked from commit 8d80a771e3)
2017-05-29 15:20:44 -03:00
stilez
6be84d7fd5 add comment
(cherry picked from commit d2d58d6ad1)
2017-05-29 15:20:42 -03:00
stilez
1ca0f7f7a0 typo
(cherry picked from commit 4711322b4a)
2017-05-29 15:20:41 -03:00
stilez
5c1fea1711 If user-entered PHP errors out, display the error line in context to help the user
If the user enters PHP in the command-line page, and it errors out, it's usually a typo or something minor. But the user is left with an error that references a /tmp file which doesn't exist at the point they read the message, a line number that's incorrect, and their input which doesn't display line numbers anyhow.

This patch fixes this, so that a user who wants to enter php command-line in the GUI and gets an error, can quickly identify the exact line causing the error.

If an error occurs (detected by either non-zero return value or output matching an error message referencing the temp script file), then an short DIV is shown above the usual PHP output for "error location". It gives the correct error line number, and shows the code with line numbers and syntax highlighting (using php's native "-s" option), pre-scrolled to the error line.
(cherry picked from commit fd1bd705c5)
2017-05-29 15:20:40 -03:00
Yoann Lecuyer
b4ff414aef Removed htmlspecialchars when loading leases from config
(cherry picked from commit 2322e9f3cb)
2017-05-29 15:20:11 -03:00
PiBa-NL
afe8afac75 auth_check, faster authentication check while automatically refreshing diag_routes
(cherry picked from commit 60ba7c7642)
2017-05-26 11:56:20 -03:00
PiBa-NL
183c713b3c auth_check, move the cmp_page_matches() to its own file so it can be shared by both auth_check.inc and priv.inc
(cherry picked from commit ddd54e83f2)
2017-05-26 11:55:38 -03:00
PiBa-NL
a4c64e37cf auth_check lowers cpu usage for checking if the user has permission for the page requested when used in place of guiconfig, especially useful for frequent requests like those made by stats and traffic widgets
(cherry picked from commit c07071cbca)
2017-05-26 11:55:37 -03:00
Phil Davis
2c4865e3fa Add missing break for cloudflare case
(cherry picked from commit d900381c93)
2017-05-26 11:54:55 -03:00
Phil Davis
543ea703f2 Integrate various cloudflare changes
(cherry picked from commit 5ce6ce4b1a)
2017-05-26 11:54:54 -03:00
Renato Botelho
d8f58b4ff8 Enable aws-sdk-php build 2017-05-25 13:58:35 -03:00
jim-p
d138398d4c Activate bandwidthd for testing 2017-05-25 09:00:08 -04:00
Renato Botelho
f94873b84b Enable iprange build 2017-05-24 13:44:08 -03:00
Phil Davis
2e294992e4 Diag DNS disable Add Alias button when host field is changed
(cherry picked from commit 45eafdbd7b)
2017-05-23 13:59:24 -03:00
Lorenz Schori
12ca33f4dc Remove stray debug-code (/tmp/script)
(cherry picked from commit a29361a2d9)
2017-05-23 13:57:43 -03:00
PiBa-NL
3af287f33a virtualips, ability to sort the table
(cherry picked from commit 77c53e65fb)
2017-05-23 13:55:14 -03:00
Phil Davis
4c4504b1e7 Make consistent rule information section
(cherry picked from commit f0dc8b688c)
2017-05-23 13:54:30 -03:00
jim-p
b44ee60da8 Add download button/function directly on status.php to ease confusion.
(cherry picked from commit f7a72733f8)
2017-05-23 12:52:30 -04:00
PiBa-NL
eb65e543b4 pkg_edit, fix empty config tag check
(cherry picked from commit 6bf2a65086)
2017-05-23 13:42:24 -03:00
Phil Davis
e78a436c55 Diag DNS fix update alias button text after add alias
1) Lookup a name with Diag DNS
2) Press "Add Alias"
The alias is added, but the button still says "Add Alias".

Actually the alias exists by now. The button should say "Update Alias".

Fix: once we have emitted the alias create/update success message, we can set $alias_exists true so that the rest of the code is based on the (possibly new) state.(cherry picked from commit 474b275684)
2017-05-23 13:41:54 -03:00
Phil Davis
f54a3ede59 Diag DNS do not show Add Alias if no priv to add alais
(cherry picked from commit 7fcccc8f09)
2017-05-23 13:41:15 -03:00
Phil Davis
14e90f2e5d Diag DNS do not create an empty alias if name does not resolve
(cherry picked from commit f445385114)
2017-05-23 13:40:25 -03:00
jim-p
2e7f67b274 Add NGID to status.php
(cherry picked from commit fcc24426ab)
2017-05-23 12:13:00 -04:00
Renato Botelho
03af3cfd44 Use recently added hwaddr field to restore original MAC address 2017-05-19 13:21:46 -03:00
jim-p
576cbe26c1 Backport changes for syslogd handling to fix #7256 2017-05-17 11:06:58 -04:00
jim-p
5917696ded Backport syslogd service definition/control to RELENG_2_3. Ticket #4382 2017-05-17 10:57:02 -04:00
Renato Botelho
64d2b953d5 Use is_numeric() to make sure $prefix is not 0 2017-05-15 10:12:36 -03:00
enukane
fa946568ae Fix parsing "::/0" as "::/128" on OpenVPN IPv6 Tunnel Remote network
(cherry picked from commit 425656522f)
2017-05-15 10:11:25 -03:00
doktornotor
df0b717d36 Fix net.inet.ip.random_id tunable description (Bug #6087)
(cherry picked from commit 77408e612d)
2017-05-15 09:38:36 -03:00
doktornotor
8740bd5ed4 Request PD even if no interfaces are set to track6 (Bug #4544)
See https://redmine.pfsense.org/issues/4544#note-4
(cherry picked from commit b0837cebf9)
2017-05-15 09:27:11 -03:00
Steve Beaver
2684f8d536 Revert "Updated d3.js and d3pie.js to latest versions"
This reverts commit 47d4784602.
2017-05-14 11:15:48 -04:00
Steve Beaver
d55301988b Updated d3.js and d3pie.js to latest versions
Fixed #7546

(cherry picked from commit 47d4784602)
2017-05-12 11:37:50 -04:00
Renato Botelho
7a5b8b4eac Start sending snapshots to nfs1 2017-05-11 17:06:18 -03:00
Renato Botelho
9c34bf7bef Send files only to NFS1 2017-05-11 11:27:13 -03:00
Renato Botelho
a4e8ba010a Start sending files to nfs1.nyi 2017-05-11 11:14:59 -03:00
Renato Botelho
e9fe384723 Rename Netgate Coreboot Upgrade package directory to better reflect port name 2017-05-10 15:59:54 -03:00
Phil Davis
0bbcbe8bea get_pkg_info improve installed_pkgs_only case
(cherry picked from commit dd6ecfa272)
2017-05-10 15:45:55 -03:00
jim-p
5479efd169 Add "netstat -nWx" to status.php output
(cherry picked from commit 6252b47062)
2017-05-10 11:15:06 -04:00
Renato Botelho
bfafb65ee2 Disable Telegraf on i386 2017-05-09 15:40:48 -03:00
aaa2ppp
22b18e3641 Update interfaces.inc
Not defined pid file on starting choparp. The pfSense may not kill the program to reconfiguration.
(cherry picked from commit 7d316581f4)
2017-05-09 13:44:04 -03:00
xygrec
0673b7b8ec Update dyndns.class
(cherry picked from commit 61c813f96d)
2017-05-09 13:43:24 -03:00
doktornotor
7ba3a02080 Fix APU2 with coreboot v4.x detection
See https://forum.pfsense.org/index.php?topic=106444.msg716558#msg716558
(cherry picked from commit 9457d0f616)
2017-05-09 13:37:48 -03:00
Renato Botelho
be291869c6 Enable Telegraf build 2017-05-08 21:31:05 -03:00
jim-p
ed44d5fb36 Only cache CP RADIUS Auth credentials when reauthentication is enabled. Fixes #7528
(cherry picked from commit d4e42c54a2)
2017-05-08 11:20:09 -04:00
Renato Botelho
6f880c0fb0 Bump pfSense version to 2.3.5-DEVELOPMENT 2017-05-03 13:37:37 -03:00
Phil Davis
af0f961b36 Fix #7508 stop write_config after reset_factory_defaults
(cherry picked from commit 3dcaae882c)
2017-05-03 09:30:38 -03:00
Phil Davis
b3a32a59a8 Typos in pkg management code comments
(cherry picked from commit 146dbf0139)
2017-05-03 09:28:50 -03:00
Phil Davis
c180fdbede Let he user know if all selected interfaces are down
in the interface statistics widget.
At the moment, if all the selected interfaces are down, the widget will just display no columns. That will make users wonder what happened.
(cherry picked from commit b22fceb2d7)
2017-05-03 09:27:09 -03:00
Phil Davis
e639325a7c Fix interface down in interface statistics widget
If an interface is down, the widget would write the interface description in a column heading but then omit the stats items. So later columns (to the right) would have the headings and stats items out of line.
This also fixes the performance problem that get_interface_info($ifdescr) was being called for every row of stats data for every interface. i.e. it was called 7 times for each interface when 1 time is enough.
(cherry picked from commit d87a9a1c97)
2017-05-03 09:26:22 -03:00