14037 Commits

Author SHA1 Message Date
Franco Fichtner
ab2cd48c13 interfaces: appease PHP 8.0 2022-06-08 15:14:57 +02:00
Franco Fichtner
5dd573b6e4 src: style sweep 2022-06-08 13:53:58 +02:00
Stephan
09d782f8f5 php80 / AutoNumberField: set minimum value to 1
Turns out the upgrade to php80 probably increased strictness of 0 == null, revealing a flaw in the AutoNumberField implementation. Easy fix is to never start at 0 unless explicitly set, in which case it's not an issue.
2022-06-08 11:31:19 +02:00
Stephan
fb32dc7fa0 php80: make sure recovery adheres to production settings as well 2022-06-08 11:31:08 +02:00
Stephan
2e6f1e2e77 php80: disable display_startup_errors except when debugging
while we're at it, PHP8 decided to enable display_startup_errors by default. Let's keep this
disabled except when in debug deployment mode.
2022-06-08 11:31:00 +02:00
Stephan
1a053334c2 php80: transition for simplepie
php80: curly brace array access deprecated & removed

dac5a3cb80

php80: fix implode argument order

38b504969e

php80: required parameters are no longer allowed after optional parameters

d18f05c9ed

php80: prevent ValueError for invalid encoding

deddccdb1a
2022-06-08 11:30:51 +02:00
Stephan
38c8927b7c php80: phalcon workaround and remove final keyword from private function 2022-06-08 11:30:40 +02:00
Stephan
0488d3669a PHP80: Add deployment options
Since PHP80 decided to turn certain notices into warnings, a way to silence these is necessary, which also presents us with the opportunity to make this configurable.
2022-06-08 11:30:22 +02:00
Stephan
a9211efbfc php80: remove $errcontext parameter from APIErrorHandler
This parameter was deprecated since 7.2.0, but is now removed. https://www.php.net/manual/en/function.set-error-handler.php
2022-06-08 11:30:02 +02:00
Stephan
e2accfdbdb php80: separator after array is nog longer supported 2022-06-08 11:29:40 +02:00
Stephan
36f8fcd0b2 Captive Portal: specify validation message for aesthetic reasons 2022-06-08 11:20:21 +02:00
Franco Fichtner
2b2da5f23d make: omit pkg-create -f default in case it changes later 2022-06-08 11:15:59 +02:00
Ad Schellevis
7a6e9f7642 OpenVPN / [Server:CSO] : Add domain search option 2022-06-08 10:18:17 +02:00
Ad Schellevis
f0e9cb1625 plist 2022-06-05 15:58:22 +02:00
Ad Schellevis
81a355b5c0 Firewall: Rules: LAN - Move Inspect action into it's own async api action to prevent long page loads on large setups. 2022-06-05 15:55:57 +02:00
Ad Schellevis
3dac44b77a Firewall: Aliases - minor regression, rowToggle button missing 2022-06-05 15:39:17 +02:00
Ad Schellevis
570309c457 Interfaces: Other Types: VLAN - add unique constraint for tag+if, closes https://github.com/opnsense/core/issues/5806 2022-06-05 15:31:43 +02:00
Ad Schellevis
84b6d07558 Firewall / Aliases: fix alias removal, closes https://github.com/opnsense/core/issues/5807
as the previous version already build files in /var/db/aliastables and therefor future cleanup work, there might be some noise when patching this without a reboot (empty bogons or other external aliases). Without this patch the issue is only that aliases aren't removed, which doesn't make this a super high priority in my humble opinion.
2022-06-05 14:26:47 +02:00
Ad Schellevis
9db6ca2fad Firewall / Rules, Livelog : performance improvements
o Since our filterlog does contain labels nowaydays (https://github.com/opnsense/core/issues/5014), we can stop parsing pfctl which can be quite time consuming
o Rate limit "filter rule stats" configd action to prevent excessive pfctl access on filter pages
2022-06-03 21:05:05 +02:00
Ad Schellevis
22166fc896 Lobby / Dashboard / Carp status - reset $status_i18n when not found, even though this shouldn't happen, a broken config might show faulty status codes 2022-06-03 19:12:40 +02:00
Ad Schellevis
3645e58241 VPN/IPsec - remember phase 1 setting for next action. closes https://github.com/opnsense/core/issues/5803 2022-06-03 18:28:55 +02:00
Franco Fichtner
2a23f2dc14 interfaces: move lo0 interface registration to loopback 2022-06-03 12:24:38 +02:00
Ad Schellevis
df2fb88bf6 Firewall: Aliases - performance improvement for large numbers of (port type) aliases.
o cache getservbyname() results when validating a port in isPort() and use the same static object in is_port() for legacy code
o move isAlias() to use getByName() in the alias model so we can add a simple caching mechanism there

To invalidate the cache for isAlias() one could either hook a new instance of the model using attachAliasObject() or attach an empty one attachAliasObject(null).
2022-06-02 19:00:08 +02:00
Franco Fichtner
7018b7b3e0 firmware: update repository silently on remote list if needed
PR: https://forum.opnsense.org/index.php?topic=28537.0
2022-06-02 10:11:20 +02:00
Franco Fichtner
c99cebb409 src: style sweep 2022-06-02 08:50:41 +02:00
Ad Schellevis
0d336c0348 VPN/OpenVPN - small regression in 657265a410 , when no tunnels are actually reconfigured, a filter reload event will be fired for each interface... which will take ages on large setups. 2022-06-01 18:23:02 +02:00
Ad Schellevis
cdcf22e80d Unbound: disabling the first DNS override entry invalides config. closes https://github.com/opnsense/core/issues/5798 2022-05-31 19:17:32 +02:00
David Mora
03f43d6c5b
Fix for Unbound Stats: zero_ttl is no longer a valid statistic (#5793)
* Update Unbound Stats to fix zero_ttl name and add additional stats

* Unbound stats - change to custom sort order
2022-05-29 18:35:06 +02:00
Ad Schellevis
77e3794081 Firewall / Aliases - exclude internal aliases on import. 2022-05-28 13:09:27 +02:00
Paul Kelso
37a1b761d7
Fix grammar. Missing period. (#5791)
Grammatical error - period missing.
2022-05-28 09:25:06 +02:00
Ad Schellevis
021786612c Firewall / Alias - when reading current alias content using pfctl, make sure to ignore empty lines. closes https://github.com/opnsense/core/issues/5788 2022-05-26 10:53:44 +02:00
Franco Fichtner
11e8c26079 firewall: remove file_notice() in filter HA sync 2022-05-24 14:07:20 +02:00
Franco Fichtner
079f1fa914 system: style sweep 2022-05-24 13:36:37 +02:00
Stephan de Wit
d61b901881
PHP80: CRL support (#5675)
Since php-openssl still has no implementation for CRLs, phpseclib is now used to provide this.

To test this commit:
- Create a CA
- Create a certificate signed by the CA
- Create a CRL and revoke the above certificate
openssl verify -crl_check_all -CRLfile <crl>.crl -CAfile <ca>.crt <certificate>.crt
2022-05-24 12:05:00 +02:00
Franco Fichtner
b1a304bef8 dpinger: no use to check twice 2022-05-24 10:23:34 +02:00
Franco Fichtner
2a7550fd0c openvpn: move device handling to plugins facility #5411
While here remove a couple of references from loops and
improve coding style while at it.

While openvpn_prepare() is not the same as reconfiguring
a device (pluginctl -d ovpns1 vs. pluginctl -s openvpn 1)
we can get away with it as used before.  It might be the
subject of later work but for the sake of clearing the
scope of interfaces_configure() this is more than enough.
2022-05-24 10:06:24 +02:00
Franco Fichtner
9cd0073030 interface: next piece of the puzzle is the post-load hardcoding #5411 2022-05-23 17:02:09 +02:00
Franco Fichtner
9e78c7ebbf ipsec: enc device is also ipsec 2022-05-23 16:51:57 +02:00
Franco Fichtner
c2cac175eb ipsec: inline device configuration #5411 2022-05-23 15:39:26 +02:00
Franco Fichtner
584f86570d firmware: move previous to v= since it special handling for it already exists 2022-05-20 12:36:55 +02:00
gibwar
507b96eeb0
Bypass cache with timestamp in upgradestatus call (#5771)
Even though the server responds with proper cache headers to avoid
browser caching, it seems that Safari (and maybe others) may still cache
repeated calls to `/api/core/firmware/upgradestatus`. This change adds
in the time-old tradition of appending the current timestamp in
milliseconds to each request which should force the browser to fetch the
resource.

Ref: https://www.reddit.com/r/opnsense/comments/umhx04/opnsense_2217_released/i83bp36/?context=5
2022-05-20 12:31:10 +02:00
Franco Fichtner
a69cade7fe firmware: lowercase search in plugins/packages
Make sure that columns don't overlap without a delimiter
to get spurious results by unwanted text concatenation.
2022-05-20 08:14:39 +02:00
Franco Fichtner
b91257d7e7 pluginctl: newline shifted elsewhere already 2022-05-19 21:53:56 +02:00
Franco Fichtner
0e908f7b1c pluginctl: fix copy+paste issue 2022-05-19 13:35:01 +02:00
Franco Fichtner
83a2d2feeb interfaces: convert loopback for #5411 2022-05-19 11:06:08 +02:00
Franco Fichtner
4641e84eb2 interfaces: fix two typos here in loopback code 2022-05-19 10:54:36 +02:00
Ad Schellevis
e810712f8b Services: Intrusion Detection: Log File - ACL mismatch, closes https://github.com/opnsense/core/issues/5781 2022-05-19 10:24:29 +02:00
Franco Fichtner
06bb115fce interfaces: add per-device worker to get rid of batch vxlan_prepare #5411 2022-05-18 17:09:00 +02:00
Franco Fichtner
59ae67c55c src: style sweep 2022-05-18 17:08:13 +02:00
Ad Schellevis
cd46d2a0c6 Fireewall : Aliases - bug fix for 49e21188a8 missed an alias name 2022-05-18 16:24:57 +02:00