25410 Commits

Author SHA1 Message Date
Ilia Ross
dce50a2039 Add missing depends for perl(FindBin)
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.652
2026-07-18 00:42:11 +02:00
Jamie Cameron
72bfd65705 Merge branch 'master' of github.com:webmin/webmin 2026-07-17 15:40:53 -07:00
Jamie Cameron
ae1eedda51 Add FindBin as a recommended module 2026-07-17 15:40:46 -07:00
Ilia Ross
f1841228ea Fix LVM resizing for expanded partition-backed disks
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
ⓘ Grow eligible PV partitions into adjacent free space before retrying `pvresize`, and treat unchanged "use all free VG space" LV targets as no-ops.
2026-07-17 20:34:36 +02:00
Jamie Cameron
c1d526542f 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
2026-07-16 14:13:51 -07:00
Ilia Ross
d75a823e67 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
[no-build]
2026-07-16 01:51:49 +02:00
Ilia Ross
b748cfb52d Update changelog for 2.652
[no-build]
2026-07-16 01:47:28 +02:00
Ilia Ross
0eaf0ef80d Fix redirect ports and linked-server WebSocket routing
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
ⓘ Follow up on #2794 by making `redirect_port` work even when `redirect_host` is not set. Keep existing host precedence and correctly handle proxy headers, IPv6 addresses, default ports, and invalid port values.

ⓘ Fix linked-server by keeping the child URL recognizable to the parent, then generating the final WebSocket URL on the same host and port the browser is using. This keeps the connection working with the current Webmin session.
2026-07-15 20:38:41 +02:00
Ilia Ross
f220c99a10 Fix ACL tests 2026-07-15 14:06:03 +02:00
Ilia Ross
32e13451ca Merge pull request #2794 from LynYugiri/master
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Fix to honor redirect settings for WebSocket URLs
2026-07-15 14:00:06 +02:00
LemoeChun
2ea3723811 Fix to honor redirect settings for WebSocket URLs 2026-07-15 17:27:16 +08:00
Jamie Cameron
0394bb8cde New safe users shouldn't inherit new permissions
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-14 10:53:05 -07:00
Jamie Cameron
5b6b43ac3d Un-trusted users should not be allowed to download non-public URLs 2026-07-14 10:45:05 -07:00
Jamie Cameron
e805319233 Root should still be able to download from anywhere 2026-07-14 10:14:09 -07:00
Jamie Cameron
f62fd9e23a Merge pull request #2789 from webmin/dev/download-target-check
Add ACL controls for URL download destinations
2026-07-14 10:09:40 -07:00
Ilia Ross
f4f3f00808 Fix missing label
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-07-14 13:02:06 +02:00
Ilia Ross
83d402a081 Update translations 2026-07-14 12:56:53 +02:00
Ilia Ross
7bef448c1d Fix label for clarity 2026-07-14 12:55:42 +02:00
Ilia Ross
18a4d6a6df Fix to clarify Unix authentication mapping behavior
https://github.com/webmin/webmin/issues/2791
2026-07-14 12:46:15 +02:00
Ilia Ross
8f725f63c6 Fix new lines 2026-07-14 02:58:54 +02:00
Ilia Ross
99f35fa38a Fix to move URL download destination controls to global ACL 2026-07-14 02:52:36 +02:00
Ilia Ross
934073532f Fix to use the existing HTTP and FTP mode 7 callback 2026-07-14 02:27:10 +02:00
Ilia Ross
a618c2b58e Fix to manually incorporated Jamie's ed3cd51 change 2026-07-14 01:57:26 +02:00
Jamie Cameron
ed3cd51e40 Also pass connected FTP address to callback function
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-13 16:34:30 -07:00
Ilia Ross
9dcdca7f1f Merge branch 'master' into dev/download-target-check 2026-07-14 00:58:07 +02:00
Ilia Ross
bf3cd03977 Fix to manually incorporated Jamie's 70011c1 change 2026-07-14 00:46:12 +02:00
Jamie Cameron
70011c11c0 Keep track of the remote IP for HTTP connections, and make it available to the callback function 2026-07-13 14:41:52 -07:00
Jamie Cameron
9e7cdc801c Use formal params 2026-07-13 14:20:14 -07:00
Ilia Ross
64f67e63d5 Add regression coverage for warning-free empty values
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2793
2026-07-13 15:08:13 +02:00
Ilia Ross
4601f268a0 Fix XML-RPC handling of undefined and empty values
ⓘ Normalize undefined and empty XML-RPC values during encoding and parsing, preventing uninitialized-value warnings and uncontrolled error-log growth.

https://github.com/webmin/webmin/issues/2793
2026-07-13 15:07:49 +02:00
Ilia Ross
dae0bf373d Fix ACL page elements order and placement 2026-07-13 14:08:25 +02:00
Ilia Ross
1555224592 Fix to refactor download address checks to use callback bundles
ⓘ Extend HTTP and FTP download callbacks with destination validation while preserving legacy tracking callbacks and enforcing SSRF policy across redirects, proxies, caches, and direct/passive sockets.

https://github.com/webmin/webmin/pull/2789#discussion_r3567985773
2026-07-13 13:36:34 +02:00
Ilia Ross
f564a3127d Add regression tests previous patch
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-12 23:50:48 +02:00
Ilia Ross
955daa53c6 Fix to use physical ACL restore when supported
ⓘ Detect support for combining `-P` with `setfacl --restore` to prevent acl 2.4.0 security warnings while retaining compatibility with older releases.
2026-07-12 23:50:34 +02:00
Ilia Ross
d5b2a174c2 Fix to rely on defaultacl 2026-07-12 19:35:03 +02:00
Ilia Ross
470b2b5533 Fix inet6 tests 2026-07-12 15:09:17 +02:00
Ilia Ross
1ca52c9a97 Add ACL controls for URL download destinations
Block non-public HTTP, HTTPS and FTP destinations by default in File Manager, Mailboxes and Upload and Download, with per-user IP/CIDR exceptions, redirect and proxy protection, cache isolation, and current-ACL enforcement for scheduled jobs.
2026-07-12 14:57:08 +02:00
Ilia Ross
30018091ee Add tests for mailbox_uncompress_folder
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-12 02:23:05 +02:00
Ilia Ross
9751fbbf50 Fix cPanel migration with dangling Maildir symlinks
https://github.com/virtualmin/virtualmin-gpl/issues/1251
2026-07-12 02:22:44 +02:00
Ilia Ross
203a87ff0e Fix to reuse copy helper for ACL-controlled file copies 2026-07-12 01:07:30 +02:00
Ilia Ross
77610666cc Fix live activation of Linux VLAN interfaces
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
ⓘ Create and detect VLAN devices before applying live configuration, parse live VLANs with their physical parent instead of a virtual alias, normalize persisted dotted VLAN names when the parent device exists, consistently target the real VLAN device across the ip, ifup and vconfig paths, skip recreating existing devices or activating absent disabled ones, and add regression coverage.

https://github.com/webmin/webmin/pull/2785
2026-07-11 13:33:58 +02:00
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