1021 Commits

Author SHA1 Message Date
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
LemoeChun
2ea3723811 Fix to honor redirect settings for WebSocket URLs 2026-07-15 17:27:16 +08: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
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
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
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
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
203a87ff0e Fix to reuse copy helper for ACL-controlled file copies 2026-07-12 01:07:30 +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
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
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
Ilia Ross
7878ef466f Fix to expire abandoned linked websocket routes
ⓘ Use the existing scheduled websocket cleanup path for linked-server ws-link routes and expire unopened temporary routes after five minutes.

This limits how long credential-bearing proxy routes can remain in `miniserv.conf` while leaving active and normal websocket cleanup behavior unchanged.
2026-06-23 02:24:17 +02:00
Ilia Ross
c72d232e2f Fix to restrict Basic auth for websocket routes
ⓘ Require websocket routes to opt in with allow_basic_ws before Basic auth is accepted in session mode. Mark linked ws-link routes and no-cookie backend-session routes as allowed, while leaving normal session-backed routes unmarked.
2026-06-23 01:09:43 +02:00
Ilia Ross
45ca170c20 Add support to proxy linked-server WebSockets
This PR adds general WebSocket proxying for linked Webmin servers, allowing modules such as `xterm` to work when opened through `servers/link.cgi`.

As requested in https://github.com/webmin/webmin/issues/1866.
2026-06-22 16:19:33 +02: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
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
Ilia Ross
0d4c65ec04 Fix to create custom temp dirs after validation 2026-06-08 18:53:57 +02:00
Ilia Ross
c11d67d989 Add support for alternate module descriptions
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-07 16:26:37 +02:00
Ilia Ross
9577737aeb Fix to harden Webmin temp directory validation
https://github.com/webmin/webmin/pull/2749#discussion_r3368028469
2026-06-06 22:40:52 +02:00
Ilia Ross
80da8d1915 Fix Webmin temp directory setup in Advanced Options
This fixes saving a custom Webmin temp directory from Webmin Configuration → Advanced Options.

Previously, setting a path like /var/webmin/tmp failed if the directory did not already exist. Users had to create it manually, and it was easy to end up with a bad parent directory such as /var/webmin with 0700, which made the saved temp path unusable.

This change makes Webmin handle the safe parts automatically:

- Creates missing temp directories and parents as 0755

- Validates existing parent directories are traversable by group/other

- Requires the final Webmin temp directory to be root-owned with mode 0755

- Allows shared temp dirs like /var/tmp when root-owned and 1777

- Shows a clear error when existing permissions must be fixed manually
2026-06-04 01:44:32 +02:00
Jamie Cameron
73821b72b0 Merge pull request #2729 from swelljoe/web-lib-funcs-test-data-transforms
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add web-lib-funcs data transform tests
2026-05-23 19:25:00 -07:00
Ilia Ross
87db158afc Fix to avoid large diffs when pretty 2026-05-22 15:06:37 +02:00
Joe Cooper
2c4467a82e Handle lowercase 2FA secret 2026-05-21 18:01:25 -05:00
Joe Cooper
65c2a0da50 Fix warnings for undef in compare 2026-05-21 17:47:38 -05:00
Joe Cooper
da2090bad7 Add web-lib-funcs data transform tests 2026-05-21 17:21:44 -05:00
Jamie Cameron
16c16f4fd4 Merge pull request #2724 from swelljoe/test-web-lib-funcs-strings
Add ip, paths, string tests for web-lib-funcs
2026-05-20 15:50:13 -07:00
Joe Cooper
100253bec3 Fix quirks in trunc and split_quoted_string 2026-05-20 15:55:07 -05:00
Joe Cooper
d2ba0d910b Fix check_ip6address in web-lib-funcs 2026-05-20 14:04:37 -05:00
Ilia Ross
cbc9595649 Add relaxed flag support
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-20 13:54:24 +02:00
Ilia Ross
2d01675139 Fix reflected XSS in Webmin status messages
* Note: Escape the /webmin/ message parameter, strip restart redirect HTML to plain text, and harden filter_javascript().
2026-05-17 14:32:10 +02:00
Ilia Ross
e60d005ab0 Fix to enforce RPC-only users before module ACL check
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Block `rpc=3` users from normal Webmin UI before `init_config` marks module ACLs checked, while explicitly allowing RPC endpoints.

https://github.com/webmin/webmin/actions/runs/25971500591/job/76344191751

45292ea815
2026-05-17 00:55:15 +02:00
Jamie Cameron
45292ea815 Respect the RPC-only setting for users 2026-05-16 12:59:58 -07:00
Jamie Cameron
af175ce12c Drop ancient support for RBAC-controller Webmin ACLs 2026-05-16 09:49:36 -07:00
Jamie Cameron
1a86501e88 Delete code and languages related to email feedback feature that is no longer linked to, or useful
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-15 16:51:34 -07:00
Jamie Cameron
dd4e3e22ef Allow global permissions to be set for new users 2026-05-15 16:43:29 -07:00
Ilia Ross
b53cce9084 Add logging option to execute command sub
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
299b10a0e8 (r184647207)
2026-05-08 12:31:16 +02:00
Jamie Cameron
25afc8aa02 Make functions for setting and getting back headers more consistent 2026-04-23 21:28:14 -07:00
Jamie Cameron
cef294dc5a Code readability cleanup
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-22 17:04:51 -07:00
Ilia Ross
da18a16c84 Fix to require 2FA for RPC basic auth
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
+ improve remote auth errors
2026-04-15 22:36:40 +02:00
Ilia Ross
87d8969efb Fix to gate forwarded proxy URL for consistency
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/pull/2666#issuecomment-4241962133
2026-04-14 14:44:57 +02:00
Ilia Ross
97774b829d Fix to trust forwarded URL headers if proxy headers are trusted
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/pull/2666
2026-04-13 15:55:31 +02:00
Ilia Ross
33e03595cf Merge pull request #2666 from swelljoe/proxy-friendly-get_webmin_browser_url
Make get_webmin_browser_url proxy-aware
2026-04-13 15:31:08 +02:00
Ilia Ross
49b8f1a2fa Fix to improve proxied connection handling
X260412
2026-04-12 14:56:51 +02:00
Joe Cooper
3a1df9d797 Make get_webmin_browser_url proxy-aware 2026-04-11 15:41:40 -05:00
Ilia Ross
ac8cbf57f9 Fix to handle HTTPS update sources with outbound SSL fallback 2026-04-10 18:56:41 +02:00
Jamie Cameron
e44a25191f Add support for headers with multiple values
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-02 07:31:51 -07:00