16772 Commits

Author SHA1 Message Date
Franco Fichtner
e07789eebb kea: only emit value if found for consistency 2024-05-17 11:59:27 +02:00
Franco Fichtner
b2e31eb56f kea-dhcp: refactor this a bit 2024-05-17 11:45:08 +02:00
Markus Reiter
139a3add4b
Support static DNS mappings using Kea DHCP. (#7362) 2024-05-17 10:50:17 +02:00
Franco Fichtner
e126d432d6 dnsmasq: stop exposing regdhcpdomain to static entries
Unbound doesn't do it either.  Eventually we want to get rid of
it completely.  For now Dnsmasq doesn't support reading DHCP
ranges to match the correct domain for dynamic leases.
2024-05-17 10:45:27 +02:00
Ad Schellevis
1c8639c338 ui: prevent vertical modal overflows and instead present a scrollbar (compile https://github.com/opnsense/core/commit/fe1a8ecfa6) 2024-05-17 09:26:59 +02:00
Franco Fichtner
4583f8ae2c make: add a little stable branch helper 2024-05-17 08:46:28 +02:00
MaxXor
e21159a973
src: resolve deprecation warnings for sre_constants (#7460)
ref https://github.com/python/cpython/issues/91308
2024-05-16 19:28:50 +02:00
Franco Fichtner
6709625ad6 src: small whitespace issue 2024-05-16 08:29:37 +02:00
Ad Schellevis
3f6b9ec4f9 VPN: WireGuard / Peer generator - pass endpoint to validator using a volatile field.
When the endpoint is invalid, the ios/android app will fail without mentioning a cause. Let's prevent obvious issues from happening.
2024-05-15 20:41:53 +02:00
Ad Schellevis
030ed198a7 Revert "Services: Kea DHCP: Kea DHCPv4 - Add Custom Options tab to assign "vendor-encapsulated-options-space" options to subnets, for https://github.com/opnsense/core/pull/7361"
This reverts commit 3f184a695fdbcbe4071f61da54227a437da94bcd.
2024-05-15 18:21:34 +02:00
Stephan de Wit
deb354ab26 dashboard: add widget selection logic 2024-05-15 16:32:13 +02:00
Stephan de Wit
f075d2d3db dashboard: properly remove charts on widget close action 2024-05-15 13:23:02 +02:00
Franco Fichtner
83fc436065 src: a couple more style updates 2024-05-14 13:40:29 +02:00
Franco Fichtner
ba435bbe5a mvc: style 2024-05-14 13:24:58 +02:00
Franco Fichtner
e12a306b54 mvc: whitespace 2024-05-14 13:21:58 +02:00
Ad Schellevis
cf03557581 System: Gateways: Configuration - prevent out of memory on migrations 2024-05-14 11:52:55 +02:00
Franco Fichtner
6a0da2725a ipsec: fix faulty "-" usage in URIs 2024-05-14 09:12:32 +02:00
Franco Fichtner
7a3e55a863 mvc: more stype updates 2024-05-14 08:20:28 +02:00
Franco Fichtner
4f7ad06b76 tests: missing copyright header 2024-05-14 08:10:31 +02:00
Franco Fichtner
590dc5c9d2 mvc: style updates 2024-05-14 08:08:55 +02:00
Franco Fichtner
112edfa525 mvc: add missing copyright header 2024-05-14 08:04:39 +02:00
Franco Fichtner
93f8e74109 src: style updates 2024-05-14 08:02:30 +02:00
Franco Fichtner
bca7574fab mvc: fix undefined $e 2024-05-13 22:52:58 +02:00
Franco Fichtner
83e73c5825 src: style sweep 2024-05-13 22:48:11 +02:00
Ad Schellevis
cf7300e230 mvc - Response add setRawHeader for backwards compatibility (for https://github.com/opnsense/core/issues/6389) 2024-05-13 22:11:20 +02:00
Ad Schellevis
908d2840ea mvc/routing - fix case sensitivity issues (e.g. /ui/ipsec/connections not reachable). implements https://github.com/opnsense/core/commit/cad494cd80 combined with a quick check if the exact expected directory name does exist (which is the case for most of our namespaces).
cc @fichtner
2024-05-13 18:42:52 +02:00
Ad Schellevis
6a0e88e7e1 mvc/api - reorganize exception handling in api handler, make sure we only send headers when not already sent and move set_error_handler() ==> Exception into api.php 2024-05-13 18:26:43 +02:00
Ad Schellevis
ef9e377fde mvc/api - improve stream handling and prevent "headers already sent" errors from being thrown.
This commit moves the output handling from the action to the Response object for stream types, which also ensures headers are being sent in the right order.
2024-05-13 18:04:31 +02:00
Stephan de Wit
ae2b376885 dashboard: firewall: add popover to event label as well 2024-05-13 16:19:03 +02:00
Stephan de Wit
706f0ccd77 dashboard: firewall: display placeholder text if no data available yet 2024-05-13 15:59:10 +02:00
Stephan de Wit
fc13a9b34e dashboard: disk widget: be more consistent with labels 2024-05-13 15:06:17 +02:00
Stephan de Wit
189fb51496 dashboard: allow widgets to force a grid update 2024-05-13 14:49:14 +02:00
Franco Fichtner
588105433e dashboard: style sweep 2024-05-13 14:29:43 +02:00
Franco Fichtner
7077e7c182 mvc: fix routing default 2024-05-13 14:14:59 +02:00
Stephan de Wit
2785cb641f dashboard: add firewall widget, change BaseTableWidget accordingly
The BaseTableWidget now contains some more rudimentary options to update
existing rows and sort on a specific column index.

The firewall widget counts events live as they happen and populates a
table in a larger view, or a doughnut chart in a smaller view as
data comes in.
2024-05-13 12:08:40 +02:00
Franco Fichtner
0a45505611 mvc: a few more manual style updates, missing copyright and updates 2024-05-13 11:22:57 +02:00
Franco Fichtner
38dad806fb mvc: style sweep, plist 2024-05-13 10:42:29 +02:00
Ad Schellevis
0a239dd688 mvc - larger overhaul replacing Phalcon Application (https://github.com/opnsense/core/issues/6389)
This removes most phalcon code currently being used on our end, except the Volt templates (which are re-wrapped) and a translation class we can easily replace later in a separate commit.
Consumers of our controller classes shouldn't notice a difference as the used objects and methods are named the same.

The most notable changes are the following ones:

* Exceptions about not being able to find a requested path now break down into different exceptions inheriting from DispatchException, which makes it easier from the entrypoint (api.php, index.php) to catch and handle accordingly.
* When not in development mode, raw exceptions are not being returned anymore, which increases security
* The Dispatcher class is reponsible for object construction and mapping validation (valid uri, but no object found)
* The Router class replaces previous Application class, it disects offered uri's into namespaces, classnames and methods to call.

In the long run there should be a seperate controller for controllers using volt templates or api calls, but as the existing ones don't distinct between this and the output handling is different now, we can park this for a later moment in time (the performance penalty should be rather low).

Some unused functionality has been removed, for example support for the  X-HTTP-Method-Override header in Request->getMethod() (see 44243c0765/phalcon/Http/Request.zep (L599-L609)).
2024-05-13 10:38:38 +02:00
Ad Schellevis
2e010a77de mvc-ui - rework paste behavior introduced in 388d99cf6f to make it less aggresive. for https://github.com/opnsense/core/issues/7456
To some degree I think always trimming the data isn't the issue, but not being able to paste at cursor position is impractical. this commit re-wires the paste action after trimming the clipboard data (in stead of overwriting the target field).
2024-05-13 09:48:01 +02:00
Ad Schellevis
d86142927e Lobby: Dashboard [new] - remove more spurious json_encode's cc @swhite2 2024-05-12 11:20:47 +02:00
Ad Schellevis
4bb594ba81 Lobby: Dashboard [new] - return data as array and let ApiMutableModelControllerBase->afterExecuteRoute() handle the conversion 2024-05-11 18:43:13 +02:00
Ad Schellevis
1738224fca core/xmlrpc - add google drive as migration / backup target.
The primary use for this is to restore these settings in System/Configuration/Backups now they share the same metadata.
2024-05-10 18:27:17 +02:00
Franco Fichtner
1c8677656e firmware: dump TLS infrmation for firmware server(s) in use
Will make it easier to identify proxy isses.
2024-05-08 12:29:35 +02:00
Franco Fichtner
80284fb281 interfaces: for consistency 2024-05-07 11:29:10 +02:00
Franco Fichtner
e37514e6f6
interfaces: tweak wording in interface gateway selection (#7445) 2024-05-07 11:17:31 +02:00
Ad Schellevis
1b4cb9f229 Services: Kea DHCP: Kea DHCPv4 - rename code to dhcp option. (https://github.com/opnsense/core/pull/7361) 2024-05-07 11:14:33 +02:00
Ad Schellevis
56b3a44d5f legacy/csrf - move csrf check code from d1962f8ed5 into legacy scope.
The original intend was to be able to reuse the Csrf class, but as this requires direct access to the session object, it's likely not a good idea for the goals of https://github.com/opnsense/core/issues/6389
Since the legacy pages need a lock on session anyway,  keeping it doesn't make a difference.
2024-05-07 11:08:55 +02:00
Franco Fichtner
24f36bf332 system: as a POC move this security setting to the automatic sysctls #7440
This might not work for all values as we would maybe like the have the
FreeBSD default itself to work its magic.  For security relevant things
bootstrapping the value is useful, but for buffer sizes it might not be.
2024-05-06 22:20:13 +02:00
Franco Fichtner
86778657ea interfaces: remove unused imports from sockstat list 2024-05-06 15:09:59 +02:00
Franco Fichtner
f978103395 backend: change docs for template helper 2024-05-06 15:05:04 +02:00