Commit Graph

25268 Commits

Author SHA1 Message Date
Ilia Ross
0cf6654fd9 Fix Postfix localhost destination after hostname domain change
- When the system hostname domain changes, update `localhost.<old-domain>` in Postfix `mydestination` to `localhost.<new-domain>`.

- This sits alongside the existing hostname/FQDN updates for Postfix destinations.

Previous behavior:

`save_dns.cgi` only updated Postfix `mydestination` entries that exactly matched:

- the old short hostname, like `host`
- the old FQDN, like `host.old-domain.test`

It did **not** update:

- `localhost.old-domain.test`

So if you changed:

```text
host.old-domain.test
```

to:

```text
host.new-domain.test
```

Postfix could become:

```text
mydestination = host.new-domain.test, host, localhost.old-domain.test
```

After this hunk, it also updates that localhost domain entry:

```text
localhost.old-domain.test
```

to:

```text
localhost.new-domain.test
```
2026-06-20 15:33:22 +02:00
Ilia Ross
c08468ec48 Fix network config spacing preservation
- Preserve existing spacing and inline comments when rewriting `/etc/nsswitch.conf` `hosts:` lines.

- Preserve indentation, comment prefix, inline comments, and field separators when rewriting `/etc/hosts` rows.

- Add tests for the `nsswitch.conf` spacing/comment behavior.
2026-06-20 15:27:28 +02:00
Ilia Ross
cb4a322042 Fix active virtual interface handling
ⓘ Treat Linux active virtual interfaces as secondary IP addresses instead of independent links, fixing alias parsing, hiding invalid status controls, rejecting down-state creation, and removing existing aliases with ip addr del when needed.

Reproduce path:

Example repro before this fix:

1. Go to **Network Configuration → Network Interfaces → Active Now**.
2. Click **Add a new interface**.
3. Enter:

```text
Name: enp0s5:1
IPv4 address: 10.211.55.21
Netmask: 255.255.255.0
Status: Down
```

4. Click **Create**.

Before the fix, Webmin could still create the alias or handle it inconsistently, because `enp0s5:1` is not a real link that can be “down”. It is just an extra IP address on `enp0s5`.

Expected after the fix:

- The UI should not offer `Status` for active virtual aliases.
- If someone submits `up=0` manually anyway, Webmin rejects it with:
  `Virtual interfaces cannot be created with down status`
- If an existing active virtual alias is saved as down through lower-level code, Webmin removes the IP using something like:

```bash
ip addr del 10.211.55.21/24 dev enp0s5
```
2026-06-20 15:23:09 +02:00
Ilia Ross
b53ca5b618 Add API helper for dependent form field state
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ API is ui_form_field_state_javascript
2026-06-20 03:29:29 +02:00
Jamie Cameron
fc546e1e65 Fix key field in new slave zones
https://github.com/webmin/webmin/issues/2767
2026-06-19 15:42:13 -07:00
Jamie Cameron
29c14acf98 Merge pull request #2749 from webmin/dev/tmp-dir-auto
Fix Webmin temp directory setup in Advanced Options
2026-06-19 12:52:18 -07:00
Jamie Cameron
ea02aeb04a Merge pull request #2768 from webmin/dev/miniserv-ipv6-cidr-1570
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Fix IPv6 CIDR access control matching
2026-06-19 10:04:04 -07:00
Jamie Cameron
d306a63744 Merge pull request #2766 from bob7123/fix-sni-callback-all-contexts
Register SNI callback on all SSL contexts, not just the default
2026-06-19 09:59:07 -07:00
Ilia Ross
a9c6fe724a Fix IPv6 CIDR access control matching
This PR fixes Webmin IP access control handling for IPv6 CIDR prefixes that are not divisible by 8, such as `/29` as mentioned in this https://github.com/webmin/webmin/issues/1570 ticket.

Before Webmin validation rejected non-byte-aligned IPv6 network sizes, and the runtime matcher compared IPv6 networks only by whole bytes. This meant valid IPv6 CIDR prefixes could not be used safely in access control rules.

Changes:
- Allow IPv6 access-control prefixes from `/0` through `/128`, without requiring divisibility by 8.
- Add bit-accurate IPv6 prefix matching for ACL checks.
- Apply the same matching behavior in both `miniserv.pl` and `webmin/webmin-lib.pl`.
- Fix IPv6 canonicalization for `::` and trailing `::` forms used by the matcher.
- Add regression tests for `/0`, `/29`, `/32`, `/63`, `/64`, `/127`, and `/128`.
2026-06-19 14:50:24 +02:00
Ilia Ross
7fd89fb350 Fix to clarify Postfix virtual alias map labels
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ The Postfix module’s “Virtual Domains” page actually manages `virtual_alias_maps`, not `virtual_mailbox_domains`.

This updates the UI labels, help text, ACL wording, and log message to call the feature "Virtual Alias Maps", reducing confusion without changing behavior.

https://github.com/webmin/webmin/issues/1541
2026-06-19 11:41:08 +02:00
Ilia Ross
ccd2b13942 Fix to enforce private basename for Webmin temp dirs
ⓘ Adds hidden `tempdirname` support and normalizes custom temp paths so Webmin always uses a private final directory like `.webmin`, while keeping the existing permission checks.
2026-06-18 20:48:47 +02:00
bob7123
74bd78ae35 Fix indentation inside foreach loop per review 2026-06-18 08:23:45 +00:00
Ilia Ross
74fd0ca12d Fix XML-RPC CGI execution under miniserv
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ Allow xmlrpc.cgi to run when invoked through Webmin's internal CGI do() path while preserving require-safe helper tests, and add regression coverage for CGI header emission.

https://github.com/webmin/webmin/pull/2763#issuecomment-4726296870
2026-06-17 15:06:18 +02:00
Jamie Cameron
8157ff60d2 Merge pull request #2732 from swelljoe/ui-lib-tests-and-quote-escapes
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add some ui-lib tests and fix quote escapes
2026-06-16 22:29:23 -07:00
Jamie Cameron
104b353476 Merge pull request #2763 from webmin/xmlrpc-strict-etc
xmlrpc.cgi strict, warnings, critic, tests, and security audit
2026-06-16 22:13:59 -07:00
Jamie Cameron
bd051635fb Merge branch 'master' of github.com:webmin/webmin
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-16 13:16:46 -07:00
bob7123
8574c70d6b Register SNI callback on all SSL contexts, not just the default
setup_ssl_contexts() registers CTX_set_tlsext_servername_callback only
on the default (*) context. Per-IP contexts from ipcert entries do not
get the callback. When a client connects to a dedicated IP, the per-IP
context is used directly, the SNI callback never fires, and the wrong
certificate is served regardless of the requested hostname.

Fix: register the same SNI callback on every context in %ssl_contexts.
The callback function is unchanged. Clients without SNI still receive
the per-IP certificate. Clients with SNI get the correct certificate
matched by hostname.

Related: https://github.com/virtualmin/virtualmin-gpl/pull/1229

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-16 16:18:12 +00:00
Ilia Ross
845f4a40e4 Fix not to print last extra line
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-16 13:24:37 +02:00
Joe Cooper
b97756b9fb Escape every < 2026-06-15 22:49:27 -05:00
Ilia Ross
8cca3a117f Fix IP address support for Webmin Let’s Encrypt certificates
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ Support IPv4/IPv6 identifiers in Webmin Let’s Encrypt requests, add days/months renewal scheduling, and enforce safe automatic renewal defaults for short-lived IP certificates.

a56748a3fc (r188893457)
2026-06-16 03:15:02 +02:00
Ilia Ross
e580dcdd40 Fix to add missing changelog entry
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
[no-build]
2026-06-16 00:56:42 +02:00
Ilia Ross
f4b121c059 Update changelog for 2.650 2026-06-16 00:47:03 +02:00
Joe Cooper
25fea8f568 Fix incorrect ui_select callers 2026-06-15 16:38:34 -05:00
Joe Cooper
69548c4bb8 Escape in ui_select, too 2026-06-15 16:35:42 -05:00
Joe Cooper
29f35302ae Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-15 14:58:47 -04:00
Ilia Ross
baad7081d3 Merge pull request #2765 from webmin/pr/2764
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Fix issues in PR #2764
2026-06-15 16:03:50 +02:00
Ilia Ross
7105021e80 Merge pull request #2764 from DandelionSprout/patch-1
Hotfixes for Norwegian translations.
2026-06-15 16:03:35 +02:00
Ilia Ross
30fb29a300 Fix bugs in translations 2026-06-15 15:51:18 +02:00
Imre Eilertsen
5f72e2e97e Update no 2026-06-15 13:50:04 +02:00
Imre Eilertsen
13a1021661 Update no 2026-06-15 13:48:13 +02:00
Imre Eilertsen
4add8b2e0f Update no 2026-06-15 13:46:03 +02:00
Imre Eilertsen
7884e5f413 Update no 2026-06-15 13:43:45 +02:00
Imre Eilertsen
2187f96d21 Update no 2026-06-15 13:40:56 +02:00
Imre Eilertsen
899c8e270e Update no 2026-06-15 13:39:32 +02:00
Imre Eilertsen
3d26bc80b7 Update no 2026-06-15 13:34:28 +02:00
Imre Eilertsen
841c3e0442 Update no 2026-06-15 13:32:24 +02:00
Imre Eilertsen
e62ee2bb4d Update no 2026-06-15 13:30:56 +02:00
Imre Eilertsen
2007354f27 Update no 2026-06-15 13:24:46 +02:00
Imre Eilertsen
bf397eac7b Update no 2026-06-15 13:23:03 +02:00
Imre Eilertsen
3325cc717e Update no 2026-06-15 13:21:47 +02:00
Imre Eilertsen
305b228c0e Update config.info.no 2026-06-15 13:19:06 +02:00
Joe Cooper
7ca3819d2b xmlrpc.cgi strict, warnings, critic, tests, and security audit 2026-06-15 01:16:09 -05:00
Jamie Cameron
1445cd7641 Check permission to delete home dirs in batch operations 2026-06-14 13:29:54 -07:00
Ilia Ross
5b0b6fbf1f Add nftables module to the core too
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-14 17:51:30 +02:00
Ilia Ross
de57c42f4a Fix to update nested group module access in parent order
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-14 16:14:21 +02:00
Ilia Ross
ce998ac478 Add module access helpers 2026-06-14 16:00:41 +02:00
Ilia Ross
f65554cec1 Fix to drop breaks 2026-06-14 14:20:21 +02:00
Ilia Ross
8953add81e Fix it to properly retire and exclude nftables for now
ⓘ Move "custom" and "postgresql" into the core Webmin package and add Debian/RPM package metadata so upgrades retire the old standalone module packages cleanly.
2026-06-14 14:06:18 +02:00
Ilia Ross
630de14410 Add custom nftables postgresql modules
https://forum.virtualmin.com/t/custom-commands-module-has-gone/137403/65?u=ilia
2026-06-14 12:46:43 +02:00
Jamie Cameron
804591f892 Merge branch 'master' of github.com:webmin/webmin
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-13 18:51:30 -07:00