16170 Commits

Author SHA1 Message Date
Franco Fichtner
8226c84a2f web proxy: move all files to plugin #7030 2023-12-19 15:11:20 +01:00
Ad Schellevis
52fe119e0c ui/legacy - support key/value combinations for error messages in do_input_validation() while keeping the old behavior ($reqdfieldsn contains only descriptions for required fields) intact. 2023-12-19 12:06:32 +01:00
Franco Fichtner
db8317cfaf firmware: geez, deal with injection of ".pkgsave" files
I don't really know what the plan is here other than breaking
existing pluggable directories and wasting space.

We do clean this up but we can't stop and clean up all becase
we can't trust pkg doing the right thing right away?
2023-12-19 11:37:05 +01:00
Franco Fichtner
ebd5696f1c firmware: lock down FreeBSD repo and fix minor annoyance 2023-12-19 10:51:25 +01:00
Franco Fichtner
a695054644 mvc: copyright year seems sus 2023-12-19 10:39:13 +01:00
Franco Fichtner
c770e7c953 firmware: make firmware scripts pluggable
For testing convenience you can run the scripts separately and
add standard output and only standard error will be reported
once included in system_firmware_configure() or

    # pluginctl firmware_reload
2023-12-19 10:38:36 +01:00
Franco Fichtner
c2f7998c70 dhcp: allow saving with invalid range when IPv4 server is disabled; closes #7085
In this post-valdation after passing validation we should make sure to prevent
validtion if not enabled.  Contrary to IPv6 the range from/to is mandatory but
doesn't always match especially when changing the IP range or switching interface
assignments.
2023-12-19 09:21:31 +01:00
Franco Fichtner
927c37c135 firmware: exclude overridable files from audit
They will also be removed from update sets.
2023-12-19 08:57:11 +01:00
Ad Schellevis
1cac50b4ac Firewall/Alias - fix traceback (wrong return type on empty response)
Traceback (most recent call last):
  File "/usr/local/opnsense/scripts/filter/update_tables.py", line 85, in <module>
    alias_content = alias.cached() if use_cached(alias_name) else alias.resolve()
  File "/usr/local/opnsense/scripts/filter/lib/alias/__init__.py", line 180, in resolve
    for address in address_parser.iter_addresses(item):
  File "/usr/local/opnsense/scripts/filter/lib/alias/auth.py", line 71, in iter_addresses
    self._update()
  File "/usr/local/opnsense/scripts/filter/lib/alias/auth.py", line 53, in _update
    for server in ovpn_status.get('server', None):
TypeError: 'NoneType' object is not iterable
2023-12-18 15:43:08 +01:00
Ad Schellevis
089612dd5c auth - minor stylefix in configd configuration. 2023-12-18 15:14:26 +01:00
Franco Fichtner
f6d8a2d834 firmware: TLS 1.3 works now on our mirrors so limit to this one 2023-12-18 11:47:01 +01:00
doktornotor
4e4f28bf09 Make the GUI interfaces selection actually honored by ntpd
Without the "interface ignore wildcard" directive, the service still listens on wildcard.
2023-12-18 10:15:35 +01:00
Franco Fichtner
35548cee4f src: style sweep 2023-12-14 21:24:56 +01:00
Franco Fichtner
60b262bcaf pkg: fix plist 2023-12-14 21:24:45 +01:00
Ad Schellevis
a1b0dd8071 configd - support optional configd config additions. This can for example be used to enforce a custom proxy or overwrite default settings specified in configd.conf
Additions may be written inside opnsense/service/conf/configd.conf.d/ using a name ending in .conf

Another use-case it to "lock-down" configd access by default using a newly default action, e.g.:

[action_defaults]
allowed_groups = wheel
2023-12-14 11:25:23 +01:00
Ad Schellevis
3e49c338b2 Core/Firmware - add audit messages for firmware actions. 2023-12-14 11:05:25 +01:00
Franco Fichtner
80b24b547b interfaces: change default port to a hint in latest VXLAN addition 2023-12-14 08:34:08 +01:00
Ad Schellevis
72dfc48866 core / ManuSystem - obey group sequence when specified for interfaces (moving them to top in the requested order). When no sequence is specified ordering remains unchanged. 2023-12-13 20:51:33 +01:00
Ad Schellevis
dea5f295ac Interfaces: Other Types: VXLAN - add optional local/remote port. closes https://github.com/opnsense/core/issues/7047 2023-12-13 19:39:19 +01:00
Ad Schellevis
86686eff4b Interfaces: Assignments - opening a new window/tab to navigate feels a bit excessive in this page. remove the target=blank tag. 2023-12-13 17:29:55 +01:00
kulikov-a
b1a77c8375
Log / use built-in event & remove auto-init (#7054) 2023-12-13 11:21:43 +01:00
Franco Fichtner
c847fb5fb3 scripts: whitespace sweep 2023-12-13 08:50:08 +01:00
Franco Fichtner
549c180e92 interfaces: follow upstream commit
Safe now after 23.7.10 base update.

See: https://reviews.freebsd.org/D38908
2023-12-12 13:03:19 +01:00
Ad Schellevis
29377cecc4 Services: Unbound DNS - add manual restore function for easier db repair. (ref https://github.com/opnsense/core/issues/7049) 2023-12-12 11:18:45 +01:00
Franco Fichtner
16836f4562 system: coding style 2023-12-12 09:49:53 +01:00
Franco Fichtner
b68fa36ea6 system: minor style thing #7063 2023-12-12 09:24:31 +01:00
Franco Fichtner
5e785afe06 system: move helper script out of the way; closes #7063 2023-12-12 08:49:32 +01:00
Franco Fichtner
a3f40673ef system: place relative links like certctl does #7063 2023-12-12 08:34:56 +01:00
Ad Schellevis
8c4b1636f8 fix plist 2023-12-11 18:12:07 +01:00
Ad Schellevis
eadb83baa4 core / trust - add simple re-implementation of certctl tool to speedup the process.
Although "openssl rehash" would be more portable, it doesn't seem to match FreeBSD's file layout.
The script in this commit mimics the certctl tool for the relevant parts, but spending a lot less time while doing so.

If at some point in time the certctl tool starts to behave again, we can simply trash this one and go back to the default option.

proposal for https://github.com/opnsense/core/issues/7063
2023-12-11 18:06:13 +01:00
Franco Fichtner
36928eb056 mvc: style sweep 2023-12-11 16:25:12 +01:00
Ad Schellevis
a59e936389 core / configd command - remove unused "json" parameter from list_macdb.py, which was made redundant in 8973b7e67d 2023-12-11 10:20:42 +01:00
Ad Schellevis
39ddda3cdc Interfaces: Virtual IPs: Settings - ProxyARP requires strict subnets. 2023-12-11 09:53:29 +01:00
Franco Fichtner
a8a3ef965b src: style sweep 2023-12-11 09:18:54 +01:00
Ad Schellevis
8973b7e67d Services: DHCPvX: Leases - cache configd action 'interface list macdb' to increase responsiveness 2023-12-10 19:50:32 +01:00
Ad Schellevis
ccee85994b core / treeview - move double click event inside treeview js code for easier re-use. 2023-12-10 15:45:42 +01:00
Ad Schellevis
b921d8fe2e core / treeview - add double click event with grid dialog. when comparing a specific path inside the tree its often easier to inspect rows, this commit adds a table representation of a node inside our standard tree. 2023-12-09 16:20:13 +01:00
Ad Schellevis
547c97a931 MVC / forms - auto trim input fields when being pasted. There is a small risk the current selector is actuall too wide, but we can tailer when needed if specific <input> tags cause issues. (https://github.com/opnsense/core/issues/2217) 2023-12-09 11:52:12 +01:00
Ad Schellevis
7c74e22554 VPN: IPsec: Mobile Clients - move save button into its own container, closes https://github.com/opnsense/core/issues/7062 2023-12-08 15:32:20 +01:00
Ad Schellevis
bb4cddda35 Firewall: Aliases - read before write in update_tables.py (minor stylefix) 2023-12-08 08:43:14 +01:00
Ad Schellevis
935c64295b Firewall: Aliases - read before write in update_tables.py.
Although in theory we should also be able to determine a change by looking at the alias and it siblings, it needs more parameters and is likely more difficult to read.
This commit should address the concerns of https://github.com/opnsense/core/pull/7057 by wrapping "read an alias content file" into a static method called "read_alias_file" and use it to determine change in both the resolv() {keeping track of this alias without siblings} and the one in update_tables.py {which is flushed to pf}
2023-12-07 17:45:44 +01:00
Franco Fichtner
52f3939106 firewall: preg_replace() nibbles away our non-catpure group; closes #7060 2023-12-07 13:22:58 +01:00
Franco Fichtner
39c1b358d1 firmware: change the changelog to always run through launcher.sh
Add -u option for this reason as we cannot afford to abort when
otherwise locked and here it also doesn't matter.  We could also
wait for the lock but this seems more beneficial and we can pick
up the correct environment as well, see 5c064a57090.
2023-12-07 10:17:16 +01:00
Franco Fichtner
5c064a5709 firmware: disallow TLS 1.0 and 1.1 on business mirror
On the mirror we control prevent the use of "legacy" TLS versions
to allow for better security.  This could be carried over to other
servers but since we don't controll most community servers this
could have negtive impact on availability depending on their config.

A quick sweep shows that all main functions check.sh, update.sh and
upgrade.sh use the launcher so that works as intended even from the
console.  Another audit is required for other firmware scripts and
situations where e.g. opnsense-update is called manually.  Ideally
all should go to launcher.sh or somehow be able to access the
required environment.
2023-12-07 09:51:11 +01:00
Franco Fichtner
3001316441 mvc: style sweep 2023-12-07 09:25:22 +01:00
Ad Schellevis
6bd5746e3f core / add configdStream action to ApiControllerBase and use it in our log viewer (https://github.com/opnsense/core/issues/6680). Sreaming might be practical in more cases, in which case it helps to isolate the functionality in our base class. 2023-12-06 11:49:54 +01:00
Ad Schellevis
f1024ebc06 crashreporter - safeguard /tmp/PHP_errors.log file before usage. 2023-12-04 18:28:07 +01:00
Ad Schellevis
bbf4bdb733 legacy/head.inc - cleanse system_get_language_code() 2023-12-04 17:47:32 +01:00
Ad Schellevis
0e3d660e18 Firewall: Aliases - read before write in alias resolve to spare unneeded diskwrites. (for https://github.com/opnsense/core/issues/6596)
Try to only save current alias content and md5 checksum when changed, but do update the md5 file modification date to ensore proper ttl handling.
2023-12-03 14:45:09 +01:00
Stephan de Wit
d73f4f7be4 MVC: flatten complex array structures for better search functionality
implode() dies when provided with arrays in arrays (on development),
so this is a good opportunity to extend the behavior a bit.

The consequence of this commit is that information that is not displayed
in a bootgrid, but still passed in as part of the dataset is also
searchable. This isn't a bad thing, but controllers still have
the option of constraining the amount of fields that should be
searched, as showcased here in interfacesInfoAction().
2023-11-30 16:45:17 +01:00