16714 Commits

Author SHA1 Message Date
Ad Schellevis
94263becc7 config: cleanup non existing load_balancer section. 2024-05-02 15:52:06 +02:00
Franco Fichtner
c9012301fe src: style sweep 2024-05-02 08:00:05 +02:00
Franco Fichtner
eea9c5c58e system: adjust log levels in google drive backup; closes #7427 2024-05-02 07:58:27 +02:00
Ad Schellevis
f7999a7d56 mvc - replace Phalcon\Filter classes for simple SanitizeFilter wrapper implementing the filters we actually use.
for https://github.com/opnsense/core/issues/6389
2024-05-01 21:33:24 +02:00
Ad Schellevis
0dc6089f8a mvc - replace \Phalcon\Filter\Validation\Exception with \OPNsense\Base\ValidationException (both simple empty Exception classes).
for https://github.com/opnsense/core/issues/6389
2024-05-01 16:44:18 +02:00
Ad Schellevis
7d212f3e5d VPN: IPsec: Connections - allow the equal sign for identity parsing as specified in https://docs.strongswan.org/docs/5.9/config/identityParsing.html, closes https://github.com/opnsense/core/issues/7424 2024-05-01 14:37:30 +02:00
Ad Schellevis
6dbdb2f23e mvc - replace Phalcon\Filter\Validation\Validator\Url with new native OPNsense\Base\Validators\Url validator
for https://github.com/opnsense/core/issues/6389
2024-05-01 14:25:58 +02:00
Ad Schellevis
9ab0edbc5f mvc - replace Phalcon\Filter\Validation\Validator\Regex with new native OPNsense\Base\Validators\Regex validator
for https://github.com/opnsense/core/issues/6389
2024-05-01 14:23:15 +02:00
Ad Schellevis
b10c17fff8 mvc - replace Phalcon\Filter\Validation\Validator\Email with new native OPNsense\Base\Validators\Email validator.
for https://github.com/opnsense/core/issues/6389
2024-05-01 14:07:14 +02:00
Ad Schellevis
c34b11d1f6 mvc - replace Phalcon\Filter\Validation\Validator\Numericality with new native OPNsense\Base\Validators\Numericality validator.
for https://github.com/opnsense/core/issues/6389
2024-05-01 13:51:47 +02:00
Ad Schellevis
5dd5426de7 mvc - replace Phalcon\Filter\Validation\Validator\PresenceOf with new native OPNsense\Base\Validators\PresenceOf validator.
for https://github.com/opnsense/core/issues/6389
2024-05-01 13:45:01 +02:00
Ad Schellevis
28c9b45687 mvc - replace Phalcon\Filter\Validation\Validator\InclusionIn with new native OPNsense\Base\Validators\InclusionIn validator.
for https://github.com/opnsense/core/issues/6389
2024-05-01 13:23:42 +02:00
Ad Schellevis
68b0397718 menusystem - replace phalcon config usage with AppConfig.
for https://github.com/opnsense/core/issues/6389
2024-05-01 11:30:01 +02:00
Ad Schellevis
37696d6cab VPN: WireGuard: Peer generator - add MTU when set on the instance, closes https://github.com/opnsense/core/issues/7422 2024-05-01 11:27:17 +02:00
Stephan de Wit
db89247c20 firewall: initial proposal for filterlog streaming
while this certainly doesn't account for all use cases, the streaming action is isolated enough to build from. For the use case of the new filter live log widget, starting from scratch on each action should be enough for now.
2024-05-01 10:43:36 +02:00
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
Franco Fichtner
dc8a3c4424 make: bring version-specific code closer together 2024-04-30 08:21:19 +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
4489190d1f plist 2024-04-25 19:14:37 +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
8f6499e33d plist 2024-04-21 13:56:45 +02:00