Commit Graph

12 Commits

Author SHA1 Message Date
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
26311baab9 Fix to use Webmin config locking for ws-link cleanup
ⓘ Make linked websocket teardown use the same `miniserv.conf.lock` convention as `link.cgi`, release the lock safely on cleanup errors
2026-06-22 20:34:00 +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
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
Joe Cooper
53c3bef94c Expand test coverage for check_ip6address 2026-05-20 16:36:28 -05:00
Joe Cooper
3e38e3268e Fix check_ip6address in miniserv 2026-05-20 14:04:53 -05:00
Joe Cooper
d1c6e8d3a3 Even more tests for miniserv.pl 2026-05-18 00:46:20 -05:00
Joe Cooper
b658bdd3ed Remove comment noise about known bug in encrypt_sha512, as bug has been fixed by this PR 2026-05-17 19:30:38 -05:00
Joe Cooper
b71c046596 More miniserv.pl tests 2026-05-17 17:28:21 -05:00
Joe Cooper
49138dc5b5 Capture warnings, instead of silencing 2026-05-17 16:14:23 -05:00
Joe Cooper
bf5ae8b5e5 Accomodate modification in place
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-16 18:33:55 -04:00
Joe Cooper
d3c9f331c8 rename miniserv-http_error.t to miniserv.t, test all subs 2026-05-13 13:11:43 -05:00