Commit Graph

25369 Commits

Author SHA1 Message Date
Ilia Ross
2fb4eb1721 Fix linked-server uploads over partial TLS writes
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
ⓘ Stream linked-server request bodies in bounded chunks, retry partial SSL writes with byte-safe offsets, detect incomplete forwarding, and add regression coverage.

https://github.com/webmin/webmin/issues/2784
2026-07-10 14:48:47 +02:00
Ilia Ross
27205bf75a Fix Usermin login URL availability check
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
ⓘ Require a live Usermin miniserv PID before allowing one-time login URL creation, so the feature is only offered when the session backend can actually be used.
2026-07-08 00:48:49 +02:00
Ilia Ross
2fb1a38192 Update changelog 2026-07-08 00:43:32 +02:00
Ilia Ross
113846d243 Fix to use one-time Usermin login URLs for switches
ⓘ Replace the legacy Usermin switch cookie/restart flow with a short-lived `session_login.cgi` handoff, while keeping the old API as a compatibility wrapper.

https://forum.virtualmin.com/t/usermin-2-550-login-from-the-virtualmin-edit-users-page-stopped-working/137491/37?u=ilia
2026-07-08 00:39:47 +02:00
Ilia Ross
eadd47e886 Fix to replace with block eval 2026-07-07 23:45:03 +02:00
Ilia Ross
c8fb79016c Fix ACL session lookups for HMAC session keys
ⓘ Load Miniserv’s session HMAC key in ACL session helpers so session listing, lookup, and user switching continue to work with HMAC-hashed session DB keys.

https://forum.virtualmin.com/t/usermin-2-550-login-from-the-virtualmin-edit-users-page-stopped-working/137491/37?u=ilia
2026-07-07 23:33:18 +02:00
Ilia Ross
a13461f9c1 Fix to respect global file ACLs for server-local imports
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
ⓘ Centralize global file ACL checks for server-local reads and applies them to batch, LDAP batch, MySQL, and PostgreSQL local import and restore flows. Files are read under the configured `fileunix` identity and staged with the correct command-user ownership, preventing constrained Webmin users from bypassing `root`, `otherdirs`, or `fileunix`.

9ceffce70f (r191495975)
2026-07-07 12:39:35 +02:00
Ilia Ross
2e0028cb65 Fix to harden local batch file ACL checks
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
ⓘ Fail closed when checking local batch file imports for Webmin-only users that do not have a Unix home directory.

This prevents an unset global file root ACL, or a home-relative root such as `~/path`, from being treated as filesystem-root access. Explicitly configured allowed directories still work as before.
2026-07-07 00:47:22 +02:00
Ilia Ross
9ceffce70f Fix local batch file imports to enforce file access ACLs
ⓘ This tightens local server-side batch file execution in the Users and Groups module.

Both user and group batch endpoints now read local batch files through a shared helper that enforces the module `batchdir` ACL, the user’s global file chooser ACL (`root` / `otherdirs`), and the configured `fileunix` read identity. Existing ACLs remain compatible by treating a missing `batchdir` as `/`, while an explicitly blank value denies local server batch files.

Regression coverage was added for allowed paths, denied paths, `otherdirs`, missing/blank `batchdir`, symlink escape rejection, and successful local batch reads.

----

Reproduction / verification steps:

1. Create a constrained Webmin user with access to the `Users and Groups` module.

2. Set the user's Global ACL:

   - Root directory for file browser: `/home/user1`
   - Other directories to allow: empty
   - Browse as Unix user: `nobody`

3. Set the user's `Users and Groups` module ACL:

   - Can view batch file form?: `Yes`
   - Batch files must be under directory: `/`

4. Create test files on the Webmin host:

   ```sh
   sudo mkdir -p /home/user1

   echo ROOT_SECRET_MARKER | sudo tee /root/batch-secret.txt >/dev/null
   sudo chown root:root /root/batch-secret.txt
   sudo chmod 600 /root/batch-secret.txt

   echo ALLOWED_BATCH_MARKER | sudo tee /home/user1/allowed.batch >/dev/null
   sudo chmod 644 /home/user1/allowed.batch

   sudo ln -sf /root/batch-secret.txt /home/user1/link-secret.batch

   echo ROOT_ONLY_ALLOWED_MARKER | sudo tee /home/user1/root-only.batch >/dev/null
   sudo chown root:root /home/user1/root-only.batch
   sudo chmod 600 /home/user1/root-only.batch
   ```

5. Log in to Webmin as the constrained user and request:

   ```text
   /useradmin/batch_exec.cgi?source=1&local=/root/batch-secret.txt
   /useradmin/gbatch_exec.cgi?source=1&local=/root/batch-secret.txt
   ```

   Expected fixed result:

   ```text
   Local file location is not allowed
   ```

6. Request an allowed readable file:

   ```text
   /useradmin/batch_exec.cgi?source=1&local=/home/user1/allowed.batch
   /useradmin/gbatch_exec.cgi?source=1&local=/home/user1/allowed.batch
   ```

   Expected fixed result:

   ```text
   Invalid action at line 1 : ALLOWED_BATCH_MARKER
   ```

7. Request a symlink inside the allowed directory that points outside it:

   ```text
   /useradmin/batch_exec.cgi?source=1&local=/home/user1/link-secret.batch
   /useradmin/gbatch_exec.cgi?source=1&local=/home/user1/link-secret.batch
   ```

   Expected fixed result:

   ```text
   Local file location is not allowed
   ```

8. Request a root-only file inside the allowed directory:

   ```text
   /useradmin/batch_exec.cgi?source=1&local=/home/user1/root-only.batch
   /useradmin/gbatch_exec.cgi?source=1&local=/home/user1/root-only.batch
   ```

   Expected fixed result:

   ```text
   Local file not found
   ```

The fixed behavior confirms that local batch file imports now enforce the configured global file ACL, reject symlink escapes, and read files using the configured Unix identity instead of the privileged Webmin process.
2026-07-07 00:29:14 +02:00
Ilia Ross
4fbb496002 Fix to resolve miniserv library path
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
ⓘ Load `miniserv-lib.pl` from the resolved `miniserv.pl` directory so symlinked daemon invocations find the helper library correctly.

f3b70b0458
2026-07-05 22:06:25 +02:00
Jamie Cameron
f3b70b0458 Merge pull request #2783 from webmin/dev/miniserv-helpers
Fix to extract miniserv helpers into library
2026-07-06 07:27:31 +12:00
Ilia Ross
f23620aebf Fix APT package arch normalization
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
ⓘ Normalize APT install-result names like `libtinfo6:amd64` to `libtinfo6` so scheduled updates can correctly detect dependency-updated packages and avoid false failure reports.

https://github.com/virtualmin/virtualmin-gpl/issues/1247
2026-07-05 14:26:35 +02:00
Ilia Ross
f2fa917827 Add test 2026-07-05 13:22:43 +02:00
Ilia Ross
80ee472980 Fix to compare version strings safely 2026-07-05 13:18:18 +02:00
Ilia Ross
1b4e2cadd4 Fix to count missing Maildirs as empty
https://github.com/virtualmin/virtualmin-gpl/issues/1248
2026-07-05 13:06:15 +02:00
Ilia Ross
f71905fc83 Add new test for miniserv library loading 2026-07-05 03:11:21 +02:00
Ilia Ross
866f8a8f69 Fix to simplify miniserv library path 2026-07-05 03:02:37 +02:00
Ilia Ross
f16f99c074 Fix to extract miniserv helpers into library
ⓘ Move miniserv helper functions into `miniserv-lib.pl`, remove the caller guard from `miniserv.pl`, and keep tests loading the helper library directly while preserving daemon startup behavior.

https://github.com/webmin/webmin/pull/2695
2026-07-05 02:51:57 +02:00
Ilia Ross
01780834ba Fix to extract XML-RPC helpers from CGI entry point
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
ⓘ Move XML-RPC marshalling helpers into `xmlrpc-lib.pl`, remove the caller guard from `xmlrpc.cgi`, and preserve coverage through direct library tests plus the CGI invocation regression.

https://github.com/webmin/webmin/pull/2763
2026-07-05 01:56:56 +02:00
Ilia Ross
9c76a2c809 Fix to remove xterm shellserver require guard
https://github.com/webmin/webmin/pull/2730
2026-07-05 01:15:08 +02:00
Jamie Cameron
6480e8c4b0 Merge pull request #2776 from webmin/dev/selinux-config
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
Fix SELinux labeling for Webmin runtime data
2026-07-04 09:51:07 +12:00
Ilia Ross
8856b13c64 Fix to use command -v instead 2026-07-03 21:26:20 +02:00
Jamie Cameron
2d350b8cba Always stop trusting SSL client cert from proxies 2026-07-03 12:03:31 -07:00
Jamie Cameron
a40a08efed Always quote paths 2026-07-03 10:15:51 -07:00
Ilia Ross
a66b142c5b Fix sleep can be zero
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-07-03 12:47:25 +02:00
Jamie Cameron
e84e4c3fe6 Add new ACL option for batch directory
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-07-02 19:10:23 -07:00
Jamie Cameron
1369e531d8 Revert "Use the more supported which instead of command"
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
This reverts commit 5717390a17.
2026-07-02 16:35:28 -07:00
Ilia Ross
c06cd1bf30 Update changelog
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
[no-build]
2026-07-02 16:24:20 +02:00
Ilia Ross
eb40e65fb3 Fix SSL and TCP monitor false uninstalled alerts
ⓘ Report SSL certificate and TCP connection, timeout, and DNS failures as down or timed out instead of not installed, and tighten built-in status
monitor loading.

The SSL certificate and TCP monitors returned -1 (not installed) for
connection failures, timeouts, and DNS errors, causing false "service
uninstalled" then "back up" notifications. Report these as down (0) or timed out (-3) instead, reserving -1 for genuinely missing.

Also survive a broken monitor library without aborting the whole scheduled check run, and fix the remote alive-monitor Webmin-down fallback typo.

https://forum.virtualmin.com/t/service-monitor-uninstalled-then-back-up/137514?u=ilia
2026-07-02 16:16:46 +02:00
Ilia Ross
8ecb615288 Fix to use use portable shell command probes 2026-07-01 13:16:41 +02:00
Jamie Cameron
1dc4d14ff8 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-30 21:18:23 -07:00
Jamie Cameron
5717390a17 Use the more supported which instead of command 2026-06-30 21:17:45 -07:00
Ilia Ross
5760fc98ba Fix patch sub-command to reload Webmin instead of restarting
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
https://forum.virtualmin.com/t/usermin-2-550-login-from-the-virtualmin-edit-users-page-stopped-working/137491/29?u=ilia
2026-06-30 22:03:39 +02:00
Jamie Cameron
a94ff2c49a 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-29 20:18:06 -07:00
Jamie Cameron
ec78452e7b Add missing icons 2026-06-29 20:17:23 -07:00
Ilia Ross
a7325b9087 Update changelog for 2.652 2026-06-30 01:47:25 +02:00
Ilia Ross
cc4bb35dee Update tests to recognize hex numeric HTML entities
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-29 23:28:48 +02:00
Ilia Ross
aa2282778e Fix to recognize hex numeric HTML entities
https://forum.virtualmin.com/t/char-redered-as-x25e6/137494/6?u=ilia
2026-06-29 23:28:28 +02:00
Jamie Cameron
1c9d57f5dd Safe mode in the custom commands module just allows execution of commands
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
2.651
2026-06-28 17:17:21 -07:00
Jamie Cameron
4ffa02d636 New version bump 2026-06-28 15:39:34 -07:00
Ilia Ross
57ad5fa535 Update labels
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-28 23:02:39 +02:00
Ilia Ross
a3f5ea3381 Update changelog
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-28 02:40:46 +02:00
Ilia Ross
2579cf54d9 Fix output 2026-06-27 23:45:31 +02:00
Ilia Ross
fa06c02be5 Update changelog
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
https://forum.virtualmin.com/t/cant-create-letsencrypt-cert-with-webmin-2-650/137484/14?u=ilia
2026-06-27 23:26:28 +02:00
Ilia Ross
d02f0b6cb5 Fix Let's Encrypt Certbot PEM path parsing
ⓘ Prevent Webmin from swallowing Certbot's key-path output when extracting PEM paths, while preserving IPv6 cert-name support and adding regression coverage.
2026-06-27 22:59:21 +02:00
Ilia Ross
81d44f8491 Fix live activation of Linux bond interfaces
ⓘ Create and configure missing bond devices with ip link, attach partner interfaces before assigning addresses, avoid legacy module auto-creation when ip is available, and add regression coverage.

Ref.: https://github.com/webmin/webmin/pull/2777
2026-06-27 18:16:38 +02:00
Ilia Ross
6135c01d57 Update changelog
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-26 23:30:00 +02:00
Ilia Ross
58f239b75c Fix SELinux labeling for Webmin runtime data
This PR adds SELinux context handling for Webmin’s default runtime directory on EL systems.

Setup now persists and applies a `var_run_t` fcontext rule when SELinux is enabled, falls back safely when SELinux tooling is unavailable, and removes the local fcontext rule when `/var/webmin` is deleted during uninstall.
2026-06-26 11:51:39 +02:00
Jamie Cameron
5aa69015f6 New version bump
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
2.650
2026-06-25 16:08:32 -07:00
Ilia Ross
061a4ae0d3 Update changelog for 2.650
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-25 00:56:03 +02:00