17413 Commits

Author SHA1 Message Date
Monviech
97fb59e24f Core: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
b404779214 Firmware: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
a2391b191c Trust: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
8484b34ff4 Kea: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
395d7353fc Kea: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
a18ac863fd Routing: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
7d4353c893 IDS: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
ac69b31711 IDS: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
041eaacf04 ipsec: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
575d5636af ipsec: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
6355951645 ipsec: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
702d0b4848 ipsec: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
e453de28a6 ipsec: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
9cbb6f217b ipsec: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
b5d39d1591 DHCPv4: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
7b8028cf65 cron: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Monviech
e5a146609a trafficshaper: Cleanup this->sessionClose 2024-10-15 10:32:59 +02:00
Ad Schellevis
2fb7965934
System: Settings: Administration - add RekeyLimit with a limited set of choices. In some regulated environments the openssh defaults are not acceptable, in which case we might need to offer some choices. (#7970)
Since RekeyLimit specifies both data and time and we don't want to overcomplicate things, it might be best to just offer some (pre validated) options.
2024-10-14 14:22:29 +02:00
Monviech
737282791e
diagnostics/treeview: Fix style targeting elements outside this view (#7968) 2024-10-14 13:05:01 +02:00
Franco Fichtner
48b172c2d5 tests: style sweep 2024-10-13 19:46:27 +02:00
Ad Schellevis
7e60e9f014 System: Access - Restructure ACL privilege handling so we can simplify storage for https://github.com/opnsense/core/issues/7904
Currently both users and groups store multiple <priv/> tags within the same container, but if we want to use MVC structures, we need to move to a single container to hold the access roles for them.
Our common seperator is a comma (,) which is not used in acl tags as these are not valid within xml tags anyway, by supporting both the future storage privA,privB and the current one we can feed this change easily in a future minor release without having to move all new mvc code already.

After this change, a config.xml may contain (combinations of):

   <priv>page-X</priv>
   <priv>page-Y</priv>

   <priv>page-X,page-Y</priv>
2024-10-13 16:19:27 +02:00
Ad Schellevis
04bc491cb7 plist 2024-10-13 16:01:18 +02:00
Ad Schellevis
1268823fc3 tests: add basic ACL tests 2024-10-13 15:59:46 +02:00
Franco Fichtner
052fff2e68 pkg: fix plist 2024-10-13 14:25:53 +02:00
Franco Fichtner
a0b4e35ea4 make: restyle 2024-10-13 14:18:05 +02:00
Ad Schellevis
84437b3812 mvc - rename PHPunit.xml to phpunit.xml so phpunit will pick it up automatically. 2024-10-12 17:10:17 +02:00
kumy
85721719af
fix: UpdateOnlyTextField incompatibility with DependConstraint (#7879)
* fix: UpdateOnlyTextField incompatibility with DependConstraint

Closes: #7878

* fix: UpdateOnlyTextField incompatibility with other Constraints

* fix: Introduce asFloat in BaseConstraint

* refactor: move isNumeric/asFloat to BaseField

* refactor: Move isEmpty() to BaseField class

* chore: Reformat to PSR-12

* refactor: Simplify isEmptyAndRequired()

* refactor: Drop isEmpty() from BaseField class

* refactor: Switch to isEmpty()

* chore: Drop unuseful comment

* revert: Restore previous check

* fix: Fix condition for SingleSelectConstraint

* revert: Remove trim() from getCurrentValue()

* chore: drop empty line

Co-authored-by: Franco Fichtner <franco@lastsummer.de>


---------

Co-authored-by: Franco Fichtner <franco@lastsummer.de>
2024-10-12 17:08:54 +02:00
Ad Schellevis
416b6ee144 MVC - move explicit cast in BaseModel when calling field->setValue() to offer the posibility to read structures in custom field types.
This is a requirement for https://github.com/opnsense/core/issues/7904

To avoid moving config items around, we need some way to handle <priv/> and <apikeys/> for example. When `setValue()` receives the `SimpleXMLElement`, we can parse the data into a flattened structure on initial read. All current callers either use an implicit string cast or an explicit one, only the BaseField and LinkAddressField types seem to need an explicit one.
2024-10-12 16:49:36 +02:00
Ad Schellevis
c345e01de2 VPN: OpenVPN: Instances - support case insensitive strictusercn matching for instances, closes https://github.com/opnsense/core/pull/7862 2024-10-11 19:49:26 +02:00
richierg
a3b6d90291
Fix crt condition in setCRL (#7961) 2024-10-11 14:33:36 +02:00
Franco Fichtner
c26e9ee6f1 firmware: move CRL verification to config.sh
We still have to deal with output issues/errors but that's
for later.
2024-10-10 09:31:15 +02:00
Franco Fichtner
c42def9fa3 firmware: clean up code duplication using config.sh
Also provide an env_init() call for internal launcher commands
to set up relevant things.We do this to move the special libfetch
handling into the locked spot underneath the launcher.sh invoke.
2024-10-10 09:19:42 +02:00
Franco Fichtner
73bc8b6d12 firmware: refine edge case 2024-10-10 08:38:21 +02:00
Franco Fichtner
ffec0034b9 firmware: fix a typo 2024-10-10 08:33:21 +02:00
Ad Schellevis
d8255a015e configd - forgot temp file cleanup in 06d507704e after expiry 2024-10-09 18:54:44 +02:00
Monviech
238d53b190
ipsec: Fix advanced option max_ikev1_exchanges, changed checkbox to text and general to charon. (#7957) 2024-10-09 18:23:42 +02:00
Ad Schellevis
d172f15ceb System/Trust - minor compat fix in certctl.py 2024-10-09 13:40:43 +02:00
Stephan de Wit
04f9e5cfc2
OpenVPN: Instances: add Require Client Provisioning option (#7956) 2024-10-09 10:46:43 +02:00
Franco Fichtner
a890e5f6e2 firmware: add other pkg mirrors to CRL check and connectivity audit 2024-10-09 10:28:52 +02:00
Franco Fichtner
d3a655f76b firmware: add CRL validation for business mirror 2024-10-08 14:39:04 +02:00
Ad Schellevis
bf6ce7a34c System: Trust - add crl bundle collector for updates 2024-10-08 13:43:23 +02:00
Franco Fichtner
954fc82f24 firmware: collect TLS hostnames to check
We will reuse this for CRL verification in a bit.
2024-10-08 13:35:47 +02:00
Franco Fichtner
a383331f57 system: improve context of changed/modified message in certctl.py 2024-10-08 08:41:20 +02:00
Franco Fichtner
2adda3edd1 system: copyright header style 2024-10-08 08:08:40 +02:00
Ad Schellevis
9a33aeb07e system/trust - link location could be a file or link, but when it exists, it should be removed. fixes:
Scanning /usr/share/certs/trusted for certificates...
Scanning /usr/local/share/certs for certificates...
Traceback (most recent call last):
  File "/usr/local/opnsense/scripts/system/certctl.py", line 195, in <module>
    cmds[sys.argv[1]]()
  File "/usr/local/opnsense/scripts/system/certctl.py", line 152, in cmd_rehash
    os.symlink(src_filename, dst_filename)
FileExistsError: [Errno 17] File exists:
2024-10-07 19:47:25 +02:00
Mathieu
96a37c2763 tests: Add failing unit tests for ComparedToFieldConstraintTest 2024-10-07 09:36:24 +02:00
Ad Schellevis
e648aefb76 Firewall: Automation: Filter - add gateway groups to the list, closes https://github.com/opnsense/core/issues/7625 2024-10-05 18:22:30 +02:00
Ad Schellevis
0cae921340 Services: Kea DHCP: Kea DHCPv4 - add editAlert message for grid edits, closes https://github.com/opnsense/core/issues/7937 2024-10-05 17:47:40 +02:00
Ad Schellevis
9ce4add4db System: Trust: Certificates - show user icon when not otherwise used, but commonname matches any of our registered usernames. closes https://github.com/opnsense/core/issues/7920 2024-10-05 17:34:43 +02:00
Ad Schellevis
1a048805d7 VPN: OpenVPN: Instances - add "interface invoke registration" event to reconfigure action, closes https://github.com/opnsense/core/issues/7869 2024-10-05 17:09:04 +02:00