Commit graph

16042 commits

Author SHA1 Message Date
Ad Schellevis
d16683d7fa remove OpenSSL flavor from bug template (https://github.com/opnsense/src/pull/189) 2023-11-11 15:42:17 +01:00
Ad Schellevis
39bc101684 Kea / Dhcp - DHCPv4 replacement, add hostname in reservations https://github.com/opnsense/core/issues/6971 2023-11-11 09:48:18 +01:00
Franco Fichtner
29d456e877 interfaces: uasort() is required, key was binding address 2023-11-11 09:22:09 +01:00
Ad Schellevis
392a549c9f VPN: WireGuard: Settings - minor regression in addClient, not adding created uuid. (47ccdcc078) 2023-11-10 18:47:32 +01:00
Ad Schellevis
7dc48d47fb MVC: searchable arrays in searchRecordsetBase(), simplify 89a60bfdae cc @swhite2 2023-11-10 18:36:51 +01:00
Stephan de Wit
89a60bfdae MVC: allow flat arrays to be searched in searchRecordsetBase()
Instead of having to return a single string, controllers should
ideally return an array for rows where multiple string values may
occupy a cell. This spares the frontend from having to split
these values up, as well as keeping the controller output parseable
2023-11-10 14:36:05 +01:00
Franco Fichtner
ca7363d2e9 system: although not pretty trim OpenSSL version info
OpenSSL 3 output is a little weird so let's cut this down.
2023-11-10 14:20:43 +01:00
Franco Fichtner
0adf8a2bb0 interfaces: prefer GUAs over ULAs when returning addresses
The concept is a bit convoluted, but apparently better than
ignoring the fact that a ULA cannot replace a GUA ever.

PR: https://forum.opnsense.org/index.php?topic=36893.0
2023-11-10 13:37:08 +01:00
Franco Fichtner
2bff035b73 firmware: support base/kernel hash in opnsense-version; closes #6998 2023-11-10 08:48:52 +01:00
Ad Schellevis
0a3621bb08 treview - fix typo in b7945798c1 2023-11-10 08:37:25 +01:00
Ronald Schellberg
d8127632e1
Kea / Dhcp - DHCPv4 replacement [#6971], Add "IP Address" to KEA reservations Table (#6999) 2023-11-10 08:30:22 +01:00
Franco Fichtner
7f7bce2e54 src: style sweep 2023-11-10 07:38:00 +01:00
Ad Schellevis
b7945798c1 mvc - split treeview template and javascript and hook via controllers. frr uses roughly the same, eventually it would be practical to reuse the source. 2023-11-09 22:13:37 +01:00
Ad Schellevis
3a24156108 Firewall: Log Files: Live View - minor cleanup in log parsing, when no label is provided, make sure our structure does return an empty value 2023-11-09 18:21:32 +01:00
Stephan de Wit
fd2e872e0f ui: use attr() to set data values for selectpickers
This seems to be an issue with the bootstrap-select update and broke
selectpickers that contained badges in the option element.
2023-11-09 16:48:01 +01:00
Franco Fichtner
239ec1a382 interfaces: comma 2023-11-09 12:20:37 +01:00
Franco Fichtner
e37a473718 firewall: also patch this spot -.- 2023-11-09 12:17:46 +01:00
Stephan de Wit
af3c8669e6 interfaces: add wireguard to list of virtual interfaces 2023-11-09 11:12:10 +01:00
Franco Fichtner
fee20400f9 firewall: fix business bogons fetch
This may have been going on ever since we moved a separate CORE_ABI
in the business edition.  Fixed community mirror to accomodate for
23.4 and 23.10 for now as the bogons are the same anyway.

PR: https://forum.opnsense.org/index.php?topic=36886.0
2023-11-09 10:50:07 +01:00
Franco Fichtner
25620da2f8 system: fix warnings and SSH fail on empty <ssh/> node
PR: https://forum.opnsense.org/index.php?topic=36866.0
2023-11-09 09:08:56 +01:00
Franco Fichtner
a2d55c8939 firewall: port can be zero in automatic rule, render accordingly
PR: https://forum.opnsense.org/index.php?topic=36885.0
2023-11-09 09:06:50 +01:00
Franco Fichtner
72e2ea399e ui: source code maps broke chrome at some point in time
It probably no longer applies, but to not risk anything remove
it and think about removing the lint pass for it.
2023-11-09 07:42:33 +01:00
Franco Fichtner
7ee772a4c5 src: style sweep 2023-11-09 07:42:24 +01:00
Ad Schellevis
72170de8ad ui - upgrade jqTree to version 1.7.5 (https://mbraak.github.io/jqTree), which seems to be backwards compatible. 2023-11-08 21:48:51 +01:00
Ad Schellevis
0227baf6a3 System: Configuration: History - when omitting the backup filename (containing a timestamp), offer the latest one found based on filename. Since backup filenames contain a timestamp, array_reverse(glob()) should provide the latest first. closes https://github.com/opnsense/core/issues/6996
Endpoint without explicit filename for this host :  https://xxx.xxx.xxx.xxx/ui/core/backup/history/this
2023-11-08 21:23:20 +01:00
Franco Fichtner
89f8807515 interfaces: code style 2023-11-08 15:19:31 +01:00
Franco Fichtner
95f2f3173d dhcp: ordering was wrong... 2023-11-07 20:33:35 +01:00
Franco Fichtner
7dc17e2822 dhcp: match naming to Dnsmasq/Unbound handling
It might be good to change the other "DHCP" to "ISC DHCP"...
2023-11-07 20:15:56 +01:00
Ad Schellevis
08fa5350bc VPN: WireGuard - replace setconf with syncconf in service control for more fluent reloading. (https://github.com/opnsense/plugins/pull/3358) 2023-11-07 18:22:59 +01:00
Ad Schellevis
b25ea1c4b8 Kea / Dhcp - DHCPv4 replacement, missing service validation for https://github.com/opnsense/core/issues/6971 2023-11-07 16:13:40 +01:00
Franco Fichtner
b787a35c8e plugins: allow special selector for plugins_configure()
Since pluginctl tells us which plugins are hooking into the
configure facilities allow us to select the plugin directly
like so:

    # pluginctl vpn:wireguard

We use the delimiter ":" here as the configure already uses
it in the function end and it's unlikely used in a file name.
Both plugins_configure() and plugctl have no room to stuff
an optional argument somewhere, but the good thing is pluginctl
does not even need support for this and the PHP code could
use it too.

Make sure nobody gets the idea to do path traversal so strip
all "." and "/" characters.
2023-11-07 12:48:14 +01:00
Franco Fichtner
ab49e2054b firmware: don't mess with the model 2023-11-07 11:46:05 +01:00
Franco Fichtner
1b10075eb8 system: provide mismatching logic without reboot
Also push through the locking in this case to be able to audit.
2023-11-07 11:04:46 +01:00
Franco Fichtner
b249c6bf0d system: make this easier to read 2023-11-07 11:04:46 +01:00
Franco Fichtner
d12f43f0d4 system: consider set failure an import failure
Tell the user about the failed area selection and also mark deleted
sections as "restored".
2023-11-07 11:04:46 +01:00
Franco Fichtner
f0c7f0439c system: extend restore to be able to migrate 2023-11-07 11:04:46 +01:00
Franco Fichtner
303e5958a2 system: add SHA-512 password hash compliance switch; closes #6966
While here increase the cost of BCRYPT and align the auth_log()
function a bit to be used in auth.inc where it should have lived
in the first place.
2023-11-07 10:00:45 +01:00
Franco Fichtner
934fc4e37d src: style sweep 2023-11-06 21:24:31 +01:00
Ad Schellevis
8b9f3a1f29 model dialog padding (3), OPNsenseStdWaitDialog needs padding which d085f4ef36 removed. 2023-11-06 21:16:37 +01:00
Ad Schellevis
eae7e36963 kea - add dependancy (https://github.com/opnsense/core/issues/6971) 2023-11-06 17:48:29 +01:00
Ad Schellevis
4333c81e65 Gateways: Single: Migrate to MVC - rework datastorage layer. regression in ebc8e34b15 2023-11-06 10:37:26 +01:00
Franco Fichtner
b739cd605e mvc: style sweep 2023-11-06 10:02:21 +01:00
Franco Fichtner
cb05c53e0b system: make trust store reload conditional
PR: https://forum.opnsense.org/index.php?topic=36824.0
2023-11-06 10:01:42 +01:00
Ad Schellevis
8e63fbb302 Kea / Dhcp - DHCPv4 replacement [https://github.com/opnsense/core/issues/6971], add "Auto collect option data" checkbox on the subnet.
Our current default (legacy) scenario is to use the configured interface addresss as gateway and primary dns, but since we don't want to complicate the templates and make the choice explicit, we're adding an option to auto-collect and persist on configuration save/apply.

This commit auto updates selected option data fields on request with the first matching address for the requested subnet found in ifconfig.
2023-11-05 19:26:48 +01:00
doktornotor
62bf0f5779
Remove localhost from automatically created Unbound ACL (#6986) (#6987)
Fixes https://github.com/opnsense/core/issues/6986
2023-11-05 14:58:44 +01:00
Ad Schellevis
ebc8e34b15 Gateways: Single: Migrate to MVC - rework datastorage layer.
This commit moves the default logic into the model so we can reflect current values into virtual fields.
For all relevant "dpinger" fields, we reflect the current value in a field named current_$field, which means we can always query the active value without touching the stored one. Determination of current is as easy as `!empty(model_value) ? model_value : default`.

Refactor the dpinger process to use the current_ fields, since "dpinger_status()" retrieves all instances including the ones not stored, safeguard the config properties to exclude status determination (as loss and latency fields don't exist).

Previously the validation messages seemed to miss some gettext(), re-add these as well and cleanup validation. By calling isFieldChanged() on the array type, we know the gateway object has changed, but not exactly which field, this might lead to some noise, but if we implement a fix for https://github.com/opnsense/core/issues/6978 , we should be able to avoid real issues with the bonus of needing less code.

The calculateCurrent() on the GatewayField ensures we can insert/update the current values after an update as these are nog aware of modifications automatically.

Finally, respect the 120 character screen limit.
2023-11-04 17:47:58 +01:00
Franco Fichtner
5ddb2292f2 firmware: lint 2023-11-03 14:16:11 +01:00
Franco Fichtner
6ef5a48772 firmware: add root file system to health audit
So we can see if UFS or ZFS is installed.

Loosely related to: https://forum.opnsense.org/index.php?topic=36745.0
2023-11-03 14:12:23 +01:00
Franco Fichtner
455e9d6e86 unbound: use tls-system-cert
According to the documentation that should work since 23.7.7.
2023-11-03 13:34:24 +01:00
Franco Fichtner
e547af2410 mvc: style sweep 2023-11-03 08:47:06 +01:00