11349 Commits

Author SHA1 Message Date
Franco Fichtner
d91e308001 firmware: allow to run audits from firmware upgrade console option #4500
Type "s" for security audit, or "h" for health audit.

We don't add it to the option prompt to not clutter the menu flow.
This is mostly for debug and development purposes.
2021-01-16 16:25:33 +01:00
Franco Fichtner
7d5b8bc24e firmware: oops, to bring stderr into pipe move redirect here #4500 2021-01-16 13:37:56 +01:00
Franco Fichtner
62948343fe console: ignore first backup, same as current 2021-01-16 13:14:35 +01:00
Franco Fichtner
6a65666a1c firmware: support console-based audit output 2021-01-16 12:55:41 +01:00
Franco Fichtner
74efc777fc firmware: only reroot on base upgrade #4500 2021-01-16 12:16:18 +01:00
Franco Fichtner
c5521fecac firmware: do not allow plugin install if remote repo version differs #4500
We need the matching mirror version for the plugins to install so
simply block the update and let the user update first (instead of
only checking for updates and then installing later versions of
plugins).

This was a larger problem in past years but it is good practice to
require an up-to-date system anyway.
2021-01-16 10:14:46 +01:00
Franco Fichtner
c1f839ef9d firmware: introduce non-core JSON metadata handling #4500 2021-01-16 09:47:04 +01:00
Ad Schellevis
dc164b39d3 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
Add category option in all nat pages, condense layout while ther so the pages are more consistent with the firewall rules

Next steps:

- reformat category selection a bit so it's more clear results are filtered and maybe count the number of items per catagory for clarity.
- add category ui to manage the model
2021-01-15 18:00:52 +01:00
kulikov-a
bc215cbc91
download_blacklists.py: fix broken lines in large files (#4606) 2021-01-15 16:14:26 +01:00
Ad Schellevis
5d173f52cf Firewall: add categories to nat/portforward page. for https://github.com/opnsense/core/issues/4587 2021-01-14 17:30:11 +01:00
Ad Schellevis
ca110dc008 MVC: base model, change LOG_LOCAL4 to LOG_LOCAL2, LOG_LOCAL4 ends up in portal auth, when using LOG_LOCAL2 it should end up by default in the systemlog. 2021-01-14 17:18:31 +01:00
Ad Schellevis
b00902e46c Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
escape category option values.
2021-01-14 17:07:17 +01:00
Ad Schellevis
8cd475cbde opnsense_ui.js whitespace 2021-01-14 17:04:25 +01:00
Franco Fichtner
6ed3e4fe8d mvc: do not migrate unversioned empty model data 2021-01-14 16:24:26 +01:00
Ad Schellevis
f23c57f4b9 Tokenize2: fix escaping, since the components uses selectors to find values, we need $.escapeSelector() to escape these properly.
If this works without issues on our end, we might consider upstreaming later.
2021-01-14 16:18:52 +01:00
Franco Fichtner
3e680e86b7 system: first backup is same as current, remove from list 2021-01-14 15:39:12 +01:00
Franco Fichtner
70d026e9e2 dhcp: small code style update in leases page 2021-01-14 14:26:02 +01:00
Matt Holgate
7aed1205b5 Hopeful fix for #4423 - Incorrect parsing of DUID in dhcpd6.leases. 2021-01-14 14:13:03 +01:00
Ad Schellevis
bbe0f3afe4 MVC model parsing: it seems that 1e092de495 was a bit too optimistic, checking for empty(string()) only works when the content was pretty printed. When flushing the current config, data isn't formatted and there's not access spacing involved. The proper fix seems to be to always parse the array and if it didn't find any non empty nodes add a template node. closes https://github.com/opnsense/core/issues/4598 2021-01-14 12:08:51 +01:00
Franco Fichtner
166b199de6 firmware: deal with *.pkgsave, offload post install bits to rc.syshook
PR: https://github.com/opnsense/core/issues/4574
2021-01-14 09:20:33 +01:00
Franco Fichtner
2cca863119 captive portal: disable faulty TLS on HTTP since lighttpd 1.4.56
PR: https://github.com/opnsense/core/issues/4596
2021-01-14 08:41:28 +01:00
Ad Schellevis
bdc4430963 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
bugfix some javascript, value need to contain the unescaped value (like it previously was when statically loaded).
2021-01-13 22:11:58 +01:00
Ad Schellevis
4035a2f955 upgrade Tokenize2 to v1.3.3 2021-01-13 19:25:33 +01:00
Ad Schellevis
fab8222aea Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
remove spacing from tokenize options, Tokenize2 doesn't seem to trim values (breakng auto-complete in this case)
2021-01-13 19:05:46 +01:00
Franco Fichtner
638dc63d58 opendns: whitespace issue 2021-01-13 17:52:53 +01:00
Franco Fichtner
3772ca0a0c opendns: add standalone mode; closes #3857 2021-01-13 17:42:02 +01:00
Ad Schellevis
3b1c3eb3d3 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
bugfix previous commit, split() should check for not null
2021-01-13 17:26:44 +01:00
Ad Schellevis
224dfb0a36 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
refactor javascript code and move it into opnsense_legacy.js for reuse. while here add a standard controller we can use to query existing categories and allow usage from the components in scope of this change.
Keep current selection in the user session so selections are sticky among tab changes and edits. The previous "hack menu" was a bit impractical to expand to other components as well.
2021-01-13 17:06:39 +01:00
Franco Fichtner
4992c11a53 system: reconfigure routes on bootup, may help #3414 2021-01-13 09:18:34 +01:00
Ad Schellevis
416fc37ee9 Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
o replace type ahead with tokenizer (mutli select) while here, since the type ahead needed fixes which we rather don't copy to the other firewall sections
o we might want to change the model serializeToConfig() and reload and send it to a separate function in config.inc later to ease migration later. Part of it could be separated with a callback, but it's not super needed
o hook categories into model for firewall rules
2021-01-12 18:14:50 +01:00
Franco Fichtner
c6f4d40ae0 system: fix tab use in previous 2021-01-12 16:23:23 +01:00
Franco Fichtner
a398928ce5 system: update message of the day, mailing lists are going away 2021-01-12 16:01:36 +01:00
Franco Fichtner
718848a836 unbound: generate all files, make sure we say "apply" on apply: closes #4536 2021-01-12 14:16:47 +01:00
Franco Fichtner
4dbc220490 dhcp: use same logic as menu figuring out if dhcpv6 is reachable; closes #4406 2021-01-12 12:16:51 +01:00
Franco Fichtner
09659ff25b firmware: disable autoscroll if client position differs; closes #4545
This excludes the "reset", i.e. when the action was done or the page
loads initially with the previous log file.
2021-01-12 11:55:45 +01:00
Franco Fichtner
93be19f402 firmware; show repository in overview; closes #4578 2021-01-12 11:20:14 +01:00
Ad Schellevis
8b7d1a5b1b MVC: add locking in JsonKeyValueStoreField type.
Although in theory the current stat() should at least make sure the same thread wouldn't execute the same action twice, it seems in reality actions are being executed
for every record in a set. Calling stat() after write+flush seems to return the previous status in stead of the one just written to disk (ufs issue on fbsd?). To prevent this from happening, use fstat() and lock the target
file while processing.

Found this with the firewall api plugin enabled and a set of rules in it, which seemed to trigger "list gateways" for every record.
2021-01-11 19:48:32 +01:00
Ad Schellevis
9550a9072a Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
o while here, make sure the existing alias migration pins on the Alias model to avoid being called by other models.
2021-01-11 18:51:43 +01:00
Franco Fichtner
f1177fae5f firmware: allow soon-to-be 21.1-RC1 update 2021-01-11 10:13:46 +01:00
Manuel Faux
6000c02a4f
Firewall ACLs: Add readonly actions to "Aliases" permission (#4588) 2021-01-10 20:11:46 +01:00
Franco Fichtner
7e7c9901eb system: should be the case via 993c9e545fb5 2021-01-10 19:33:46 +01:00
Lucas Held
b138ca38a7
pftop: fix all state value (#4584) 2021-01-10 19:02:39 +01:00
Franco Fichtner
3bb2b4eb14 firmware: print core package name, database checkup first or return 2021-01-09 21:29:17 +01:00
Ad Schellevis
7c50093c12 UI: move sidebar stage from session to local storage to persist between tabs, closes https://github.com/opnsense/core/issues/4580 2021-01-08 19:14:05 +01:00
Franco Fichtner
93e5105f9e src: style sweep 2021-01-08 19:44:45 +01:00
Ad Schellevis
993c9e545f WebGui-Auth: move authentication to unified service implementation. closes https://github.com/opnsense/core/issues/4505
eventually we might want to consider using pam, but at the moment this won't offer much more and would involve additional complexity when it comes to password expiry.
2021-01-08 18:46:30 +01:00
Ad Schellevis
42e36973f7 diag_authentication.php : stylesweep 2021-01-08 18:43:46 +01:00
Ad Schellevis
a57abe792f legacy: ditch is_validaliasname() for good. closes https://github.com/opnsense/core/issues/4470 2021-01-08 17:33:00 +01:00
Ad Schellevis
a539124fe9 firewall: live log - add "host" and "port" filters. closes https://github.com/opnsense/core/issues/4365 2021-01-08 17:22:26 +01:00
Ad Schellevis
2c3c8e7a02 firewall: live log - sort interfaces in log_filters endpoint. closes https://github.com/opnsense/core/pull/4402 2021-01-08 16:24:19 +01:00