13941 Commits

Author SHA1 Message Date
Franco Fichtner
a9da63d2cd pkg: fix plist 2022-04-19 08:02:16 +02:00
Ad Schellevis
3c59ca1269 Firewall / Aliases - change log level on geoip download to notice (it's message, not an error) 2022-04-16 02:56:57 +02:00
Ad Schellevis
fcef2d65d2 Firewall: Diagnostics: Aliases - simplify sort and add natural sorting. closes https://github.com/opnsense/core/pull/5716 2022-04-16 00:58:28 +02:00
Ad Schellevis
6814f32755 MVC - Phalcon 5 migration and options to lose dependency of phalcon validation classes.
Minor regression in previous commit, performValidation()'s return type didn't match. Ideally we would rather switch to plain array's, but since performValidation()
is used in multiple areas (including plugins) we better opt for compatiblity now.

ref  https://github.com/opnsense/core/pull/5711
2022-04-15 23:41:54 +02:00
Ad Schellevis
c67ca3fd87 MVC - Phalcon 5 migration and options to lose dependency of phalcon validation classes. part duex
Although our previous strategy should work according to how bind() and validation() are being implemented (https://github.com/phalcon/cphalcon/blob/4.2.x/phalcon/Validation.zep),
in reality it seems they aren't the same. Our previous attempt failed some validations (such as booleans) for no valid reasons.

Long term we should remove the phalcon dependency as these effects are highly unpredictable.
2022-04-15 17:53:25 +02:00
Luis Nachtigall
e23de4c457
Update blocklists.conf (#5710)
Changed no coin list as old one is inactive/archived
2022-04-15 08:36:28 +02:00
Ad Schellevis
ee3c05bc0b Firewall / Aliases - add markUnchanged() in BaseField type so we can avoid validation on virtual fields (issue introduced in https://github.com/opnsense/core/pull/5668) 2022-04-14 17:56:20 +02:00
Ad Schellevis
bc881b9c11 MVC - Phalcon 5 migration and options to lose dependency of phalcon validation classes.
Since Validation() in 5 moves to Filter\Validation (https://docs.phalcon.io/5.0/en/upgrade#general-notes) and the class is used in strict parameter passing,
it will be difficult to import a situation which works both on 4 and 5.

To prevent future issues, but keep the current situation functional with minimal changes, we wrapped Validation() into a class of our own. When validators inherit from BaseValidator, these are assumed to
be less strict and bound to our own handling. Phalcon validations will follow the old path for now.

Migrating existing validations on our end, should be as simple as changing the following lines:

-use Phalcon\Validation\AbstractValidator;
-use Phalcon\Validation\ValidatorInterface;
-use Phalcon\Validation;
+use OPNsense\Base\BaseValidator;

-class CallbackValidator extends AbstractValidator implements ValidatorInterface
+class CallbackValidator extends BaseValidator

-    public function validate(Validation $validator, $attribute): bool
+    public function validate($validator, $attribute): bool

Todo: choose the "correct" Validation() based on phalcon version.
2022-04-14 17:52:14 +02:00
Franco Fichtner
83779cd324 firmware: list locked packages in health audit
Might be relevant to update issues as reported via Reddit.
2022-04-14 12:57:00 +02:00
Ad Schellevis
f91d7f44e6 VPN / OpenVPN / Client Export - change filetype to test/ovpn, closes https://github.com/opnsense/core/issues/5687
While here, also validate if client_cn exits before usage.
2022-04-13 19:03:36 +02:00
Franco Fichtner
fa1511652d dpinger: allow up to three arguments passed
Required for RRD bootup change.  The default argument pass is 1
for historic reasons.
2022-04-13 09:02:16 +02:00
Franco Fichtner
c5fc553ecf firmware: force all should indicate base/kernel reinstall; closes #5701 2022-04-13 08:32:55 +02:00
devin122
6de64cf9d7
Services / Unbound - overrides: fix handling of wildcard aliases (#5707)
Wildcard functionality of HostnameField was refactored
See f110c988d4c5722308d0ec7a4ef5b86c0b3f767c
2022-04-12 21:33:07 +02:00
Ad Schellevis
9a913fd3ca Services / Captive portal - add extendedPreAuthData checkbox to support returning the client mac address when /api/captiveportal/access/status/<zone>/ is called for authentication. closes https://github.com/opnsense/core/issues/5684 2022-04-12 16:20:37 +02:00
Ad Schellevis
43777a5465 Firewall: Diagnostics: Sessions - fix ACL for used api's. closes https://github.com/opnsense/core/issues/5692 2022-04-12 15:33:17 +02:00
Ad Schellevis
833b0904c4 Service / Unbound - ACL mismatch for overrides closes https://github.com/opnsense/core/issues/5704 2022-04-12 15:27:30 +02:00
Stephan de Wit
b5b7670b48 Unbound: sort on host/domain name for overrides 2022-04-12 10:33:15 +02:00
Franco Fichtner
2a3f201d38 firmware: use isolated directory for database update check
Otherwise we end up trashing our main package database.

PR: https://forum.opnsense.org/index.php?topic=27875.0
2022-04-12 10:25:39 +02:00
NOYB
ef989b21d0 unbound: overrides: mvc: case sort order
Unbound host and domain sort order.

Host and domain names are case insensitive.  Should be handled case insensitively.  myHost comes before YourHost.  Always.

Sort order should be:
myHost
YourHost

Not:
YourHost
myHost
2022-04-12 10:25:22 +02:00
Franco Fichtner
38848023e8 src: style sweep 2022-04-12 08:10:28 +02:00
Stephan de Wit
0e3a02bfd2
Unbound overrides: fix validation message style issue (#5700) 2022-04-11 18:23:24 +02:00
Franco Fichtner
94ad563566 pkg: fix plist 2022-04-11 16:39:36 +02:00
Stephan de Wit
de9f860fdd Unbound / Domain overrides: accept _msdcs since legacy supported it. Closes #5697 2022-04-11 16:39:06 +02:00
Franco Fichtner
e378d0e0fc plugins: old plugins with missing functions may produce fatal errors
PR: https://forum.opnsense.org/index.php?topic=27901.0
2022-04-11 15:24:08 +02:00
Franco Fichtner
47bd7f4568 firewall: change "product" to "automatic" and sort both lists a bit 2022-04-11 14:57:39 +02:00
Franco Fichtner
2d84691768 firmware: cross-version check not using correct information 2022-04-11 12:14:07 +02:00
Franco Fichtner
b391195f25 interfaces: fix typo 2022-04-11 08:10:22 +02:00
Franco Fichtner
e40c4a0648 system: remove nop 2022-04-11 08:09:16 +02:00
Franco Fichtner
e28f39709c src: style sweep 2022-04-11 07:46:13 +02:00
Franco Fichtner
d78a7b08c4 pkg: fix plist 2022-04-11 07:43:08 +02:00
Ad Schellevis
44b669d8ff Services / Unbound - missing $uuid in setBase() for setHostAliasAction(). closes https://github.com/opnsense/core/issues/5691 2022-04-10 16:29:18 +02:00
Ad Schellevis
3a9763d527 Services / Unbound - add missing alias descriptions (including migration). while here also make the migration a bit more resilient for hostname validation issues. closes https://github.com/opnsense/core/issues/5695 2022-04-10 16:20:10 +02:00
Ad Schellevis
626c3dbf55 MVC / Core - when throwing Validation\Exception, make sure to add the current field contents when we can find it. This improves model migration log output and helps debugging issues. related to https://github.com/opnsense/core/issues/5693 2022-04-10 14:59:26 +02:00
Ad Schellevis
714eca2b18 Services / Unbound + core MVC - extend ModelRelationField to show combined descriptions using vsprintf() and implement hostname.domain in new unbound alias popup. closes https://github.com/opnsense/core/issues/5694 2022-04-10 14:35:05 +02:00
Ad Schellevis
ff11cde38e Services / Unbound - fix domain override ip validation as it may contain a port number using the following format x.x.x.x@53 cc @swhite2
When migration failed into 22.1.5, this patch in combination with `/usr/local/opnsense/mvc/script/run_migrations.php` should fix migration issues. No new model version is needed as
the previous version wasn't able to migrate in this case. closes https://github.com/opnsense/core/issues/5693
2022-04-09 08:50:38 +02:00
Vlad Glagolev
4d8468434c
System -> HA-> Settings : Typo fix (#5689) 2022-04-09 08:15:54 +02:00
Franco Fichtner
4485895274 dhcp: allow custom configuration from directories; closes #5313 2022-04-08 14:23:48 +02:00
Franco Fichtner
1b7ab40ce4 dhcp: support ipxe; closes #5385
Suggested by: @alex-s-team
2022-04-08 13:55:56 +02:00
Franco Fichtner
09e68888b4 firewall: make sure people realise default deny also means state violation 2022-04-08 11:50:45 +02:00
Franco Fichtner
80ba04f721 dhcp: reload action for cron; closes #5410
Change the structure a little to support reloading either all
dhcp-related services or only a certain address family through
optional parameter: "inet" for IPv4 and "inet6" for IPv6.

The issue with the original proposal was that although dhcpd6
was restarted we also need to restart radvd since it is affected
by the same bug #4691 and still seems to be happening in the wild
in FreeBSD 13.

While here expand to full path of pluginctl in an unrelated file.
2022-04-07 16:22:38 +02:00
Franco Fichtner
8ea40560df system: use protect -i here for future-proof setup
Still needs a base system fix but will be included shortly.
2022-04-07 14:55:36 +02:00
Franco Fichtner
61def877f2 system: protect syslog daemon from OOM kill
SSHD does something similar.  Obtained via IRC.
2022-04-07 12:02:51 +02:00
Franco Fichtner
2414ed3955 src: fix typo and sync LICENSE 2022-04-06 09:23:00 +02:00
Ad Schellevis
816d3972c8 Services / Captiveportal - prevent cleansing password field, closes https://github.com/opnsense/core/issues/5678 2022-04-05 22:30:54 +02:00
Franco Fichtner
6ef03ba7e4 interfaces: comment on previous, add TODO 2022-04-06 07:58:14 +02:00
Franco Fichtner
6d1d52b3db pkg: add glue to change phalcon version
Switch to version 5:

    make upgrade CORE_PHALCON=

Version 4 is used by default on PHP 7.4 and only version 5 can be
used with PHP 8.0.
2022-04-06 07:55:31 +02:00
Franco Fichtner
629cede204 firmware: fix this check like the other one 2022-04-05 14:41:31 +02:00
Franco Fichtner
248664c816 system: protect -n test with quotes, shell style while at it 2022-04-05 10:05:01 +02:00
Ad Schellevis
e0f9acc76a Reporting -> Health -> System -> CPU Temp - add temperature sources to rrd collection. closes https://github.com/opnsense/core/issues/5601
Always prefer cpu temp as before, when not available consider the folowing options

o hw.acpi.thermal.tz0.temperature --> ACPI temp
o hw.temperature.CPU --> apparantly used for arm devices.
2022-04-05 09:57:43 +02:00
Franco Fichtner
3d5c8433e7 unbound: fix permissions 2022-04-05 09:33:36 +02:00