Franco Fichtner
51148ea1cc
src: style sweep
2024-04-30 21:48:39 +02:00
Franco Fichtner
f2e60c18f6
interfaces: evidence suggests + 2 is better than + 1 #7400
...
The + 1 was completely arbitrary to begin with (derived from
FreeBSD scripting), but if part of the system needs longer to
cope with tentative state then this would be an easy way to
make it more reliable.
If + 3 makes sense for the next person is something I want to
doubt, however.
Special thanks go to @Wireheadbe for pursuing and testing this.
2024-04-30 21:45:57 +02:00
Ad Schellevis
cd0e45edf6
Firewall: Aliases - remove Phalcon component usage in model
...
for https://github.com/opnsense/core/issues/6389
2024-04-30 21:17:00 +02:00
Ad Schellevis
100aac2fb8
mvc-unittests : remove Phalcon\Di\FactoryDefault usage and support partial app config updates in AppConfig to support different config files in the unit tests.
...
for https://github.com/opnsense/core/issues/6389
2024-04-30 18:27:23 +02:00
Ad Schellevis
cbc01cb39c
mvc: replace Phalcon\Config\Config usage for new and simplified OPNsense\Core\AppConfig class.
...
for https://github.com/opnsense/core/issues/6389
2024-04-30 17:51:12 +02:00
Stephan de Wit
a7c1cc1a82
mvc: configdStream: minor regression in 177aa89b13
...
If zlib compression was never enabled to begin with, the ob_end_clean()
will close the current Phalcon output buffer, which means the
ob_end_flush() will cause a fatal error. To prevent this we can check
if there is an output buffer still active.
2024-04-30 16:38:57 +02:00
Stephan de Wit
ef9ef6ae74
dashboard: Disk widget
2024-04-30 16:28:10 +02:00
Stephan de Wit
5edad25f85
dashboard: move common formatBytes operation to base class
2024-04-30 16:28:10 +02:00
Ad Schellevis
d1962f8ed5
legacy/csrf - remove Phalcon\Encryption\Security\Random dependency for a simple Csrf class offering the same random url safe base64 encoded string.
2024-04-30 14:11:54 +02:00
Ad Schellevis
177aa89b13
mvc: ApiControllerBase->configdStream() - prevent zlib compression as this will add buffering as well, which will result in sluggish behavior for dashboard widgets when webui compression is enabled. ( https://github.com/opnsense/core/issues/7244 )
2024-04-29 15:32:22 +02:00
Ad Schellevis
523c6af2f3
Lobby: Dashboard [new] / traffic graph - use offer time instead of "now()", when EventSource() results are stashed, it should keep using the original timestamps.
2024-04-29 13:23:03 +02:00
KitKat31337
c1548926ad
fix: 🐛 Update field separator for Kea DHCP Subnet Form and Model ( #7418 )
...
Co-authored-by: Katerina Ford <kford@madtechnicalsolutions.com>
2024-04-29 08:31:07 +02:00
Franco Fichtner
93e0d14748
system: deny access to .core files from web GUI
2024-04-28 09:02:22 +02:00
Ad Schellevis
c2d7cae6c3
Reporting: Traffic - back to 0d7b9fd34f as is_private is easier on the eyes
2024-04-27 19:54:43 +02:00
Ad Schellevis
67f6aeed2b
py-netaddr - replace netaddr for standard ipaddress package in cases where it's not required to search the mac databases. closes https://github.com/opnsense/core/issues/7415
2024-04-27 19:14:39 +02:00
Franco Fichtner
dd46067d73
mvc: style sweep
2024-04-25 19:22:40 +02:00
Ad Schellevis
cd81bcc964
Firewall: NAT: One-to-One - refactor to MVC, closes https://github.com/opnsense/core/issues/7250
2024-04-25 19:13:50 +02:00
Ad Schellevis
6f24db1a01
mvc/model/ContainerField - pass isFieldChanged() to children.
...
Noticed this issue while working on filter validations, which seemed to re-validate each item on every migration due to FieldTypes inheriting from ContainerField.
This is a minor change, but will prevent record validations from triggering unnecessary.
2024-04-25 18:43:06 +02:00
Ad Schellevis
697992bb53
mvc/model - implement getDescription() in NetworkAliasField. As this field type acts as a single (non-list) type, we need to return the description from here as well as BaseListField's implementation doesn't apply here.
2024-04-25 15:45:50 +02:00
Ad Schellevis
b139e33e4c
mvc/model - BaseListField replace array_map+strval for loop with cast to preserve execution time. The mapping with strval seems to be rather slow, a simple cast seems to be roughly 4 times faster.
2024-04-25 14:52:54 +02:00
Stephan de Wit
f652640a6b
MVC: deal with explicit buffering on Phalcon side
...
The start() and finish() methods in Phalcon start and close an output buffer respectively. If we clear this buffer prematurely, as is needed for streaming data, we must handle the exception that pops up as a result of Phalcon trying to close the buffer again. In cases where such control over the output is needed, we must also assume that the headers have already been sent, so silence the output in this case to prevent a PHP fatal error.
2024-04-25 14:32:15 +02:00
Ad Schellevis
50bd3dc48c
Trust: swapped issuer and subject in parseX509(), closes https://github.com/opnsense/core/issues/7389
2024-04-25 10:14:37 +02:00
Franco Fichtner
fd7ec1b804
interfaces: hmm, dead code in core.inc ?
2024-04-24 08:58:07 +02:00
Ad Schellevis
b0bf317640
VPN: IPsec: Virtual Tunnel Interfaces - safeguard config access in updown_event.py as get() doesn't have a default. ( https://github.com/opnsense/core/issues/6781#issuecomment-2073439667 )
2024-04-24 08:37:22 +02:00
Franco Fichtner
b27881c436
interfaces: move radvd and rtsold to system log where they belong
...
We've long moved dhcp6c to this spot but we're still missing a bit of
context during debugging, e.g. why rtsold keeps restarting dhcp6c with
a SIGHUP.
2024-04-23 17:04:04 +02:00
Ad Schellevis
862b1d7f8f
System: Trust: Revocation - forgot to persist new lifetime, causing the following exception:
...
Exception: Failed to parse time string (+ days) at position 0 (+): Unexpected character in /usr/local/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php:347
Stack trace:
2024-04-23 10:46:38 +02:00
Ad Schellevis
633ba995ed
System: Trust: Revocation - check input before use on revoked selectors
2024-04-23 10:27:48 +02:00
Monviech
4aa0d5a1e1
System/Trust: Make description in Trust required ( #7403 )
...
* Make description in Trust required, since it is used to display the certificate in many parts of the system.
* Revert model version bump to 1.0.0
2024-04-22 15:39:35 +02:00
Ad Schellevis
885aba5944
System: Trust: Certificates - missing lock on delete action, closes https://github.com/opnsense/core/issues/7402
2024-04-22 13:11:17 +02:00
Franco Fichtner
5db3c3492f
interfaces: detect and ignore "detached" state for IPv6
...
PR: https://forum.opnsense.org/index.php?topic=39995.0
2024-04-22 12:51:10 +02:00
Franco Fichtner
b9317c3f53
src: style sweep
2024-04-22 10:03:33 +02:00
Ad Schellevis
3f184a695f
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
2024-04-21 17:56:04 +02:00
Ad Schellevis
73c3b88eb0
System: Settings: Logging - maximum log file size ignored when there's only one file in the directory. closes https://github.com/opnsense/core/issues/7397
...
The rotate function needed the next file to calculate the suffix, which is problematic if someone just cleaned all logs. This patch improves the match a bit (last _ instead of assuming _ doesn't exist in the name) and uses "1" for the first rotate action.
2024-04-20 09:53:00 +02:00
Ryan Winter
81676259d3
misquelling of address in wireguard peer generator ( #7398 )
2024-04-19 19:43:51 +02:00
Ad Schellevis
f0e62a3902
System: Trust: Authorities - missing return on "add" action, problem described in https://github.com/opnsense/core/issues/7390
2024-04-19 17:59:54 +02:00
Franco Fichtner
917cfdc2cb
system: make log rotate action available to cron
2024-04-19 15:01:53 +02:00
Stephan de Wit
be5ad0f5fc
dashboard: memory widget: missing endpoint declaration and title change
2024-04-19 12:37:19 +02:00
Stephan de Wit
a2e14b2b8c
dashboard: memory widget
...
Also some minor performance improvements as suggested by https://www.chartjs.org/docs/latest/general/performance.html .
in contrast to the old dashboard memory calculation, this widget does not consider ARC to be part of used memory anymore.
2024-04-19 12:21:54 +02:00
Ad Schellevis
6d770f2751
mvc/bootgrid edit dialog - lock save button while in progress to prevent duplicate input. closes https://github.com/opnsense/core/issues/7390
2024-04-18 20:57:17 +02:00
Ad Schellevis
4b93d59fd1
System: Access: Users - change user certificate handling to align with the new MVC module.
...
Remove the previous link from the user to the certificate as this suggest some relation between the two that doesn't exist (other than the name).
In the userview, the certificate list contains all client certs with the same commonname and verifies if the logged in user is able to access the trust module to prevent data leakage.
closes https://github.com/opnsense/core/issues/7387
2024-04-17 21:40:06 +02:00
Ad Schellevis
8071c8700f
VPN: OpenVPN: Connection Status - fix "attempt to read property...", closes https://github.com/opnsense/core/issues/7388
2024-04-17 20:32:59 +02:00
Ad Schellevis
80b65b0d5d
Services: Kea DHCP [new]: Kea DHCPv4 - move json file generation to a plugin hook, process feedback from d241cfda90
...
(ref: https://github.com/opnsense/core/pull/7361 )
2024-04-17 20:21:45 +02:00
Ad Schellevis
08ee9c0175
jquery-bootgrid - sync with https://github.com/opnsense/jquery-bootgrid/pull/7
2024-04-17 16:36:20 +02:00
Franco Fichtner
353c89f5c0
mvc: style update
2024-04-17 10:51:59 +02:00
Franco Fichtner
981ac3ddee
system: whitespace nitpicking
2024-04-17 10:47:07 +02:00
Franco Fichtner
dc80b7a019
src: style sweep
2024-04-17 07:23:02 +02:00
Ad Schellevis
d241cfda90
Services: Kea DHCP [new]: Kea DHCPv4 - move json file generation to a plugin configure hook, keep empty templates to inform people.
...
(ref; https://github.com/opnsense/core/pull/7361 )
2024-04-16 20:15:21 +02:00
Ad Schellevis
597b65a2e5
Services: Unbound DNS: Blocklist - change blocklist processing in _blocklist_reader()
...
When downloading files, throw errors and handle them in _blocklist_reader() so ew can decide to use the original cached one if still available. Move error handling to the same spot.
closes https://github.com/opnsense/core/issues/7371
2024-04-16 17:50:13 +02:00
Ad Schellevis
b551927c89
Services: Kea DHCP [new]: Kea DHCPv4 - fix missing default domain in 29e87aa3e4
...
(ref; https://github.com/opnsense/core/pull/7361 )
2024-04-16 12:31:07 +02:00
Ad Schellevis
c4b64a417d
mvc: further improve 10c81a4eea to allow sorting on descriptive values and unify usage in ModelRelationField, closes https://github.com/opnsense/core/issues/7383
2024-04-16 12:27:37 +02:00