1325 Commits

Author SHA1 Message Date
Ilia Ross 6183a4006a Add an option to rotate Miniserv logs using logrotate
This PR adds the ability for the logging pages to hand the Miniserv access and error logs, and the Webmin actions log, to logrotate instead of having Miniserv periodically delete them. The generated section uses copy-truncate rotation, since Miniserv only reopens its error log when the file disappears.

The option only appears when the Log File Rotation module is available and configured correctly.
2026-08-22 01:03:48 +02:00
Ilia Ross 850cc1f498 Fix error log check on systems without systemd unit 2026-08-21 21:24:23 +02:00
Ilia Ross 523853963e Add option to send Miniserv errors to the systemd journal
Add a Logging page to the Usermin Configuration module for the access-log settings, guarded by a new "log" ACL.

Also, Webmin and Usermin logging pages add new an "Error log destination" choice on systemd systems. Selecting the journal sets errorlog=- and installs a local StandardError=journal drop-in, leaving the packaged unit untouched.

https://forum.virtualmin.com/t/miniserv-webserver-log-growing-too-big-should-be-rotated/136562/10?u=ilia
2026-08-21 21:02:58 +02:00
Jamie Cameron 508a7e3eab Add fields for real name for default destination 2026-08-19 17:29:47 -07:00
Ilia Ross 199dae2562 Remove bundled Miniserv certificate and safely fall back to HTTP 2026-08-09 15:27:13 +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 2026-07-03 12:47:25 +02:00
Ilia Ross 57ad5fa535 Update labels 2026-06-28 23:02:39 +02:00
Ilia Ross 2579cf54d9 Fix output 2026-06-27 23:45:31 +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
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 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 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 845f4a40e4 Fix not to print last extra line 2026-06-16 13:24:37 +02:00
Ilia Ross 8cca3a117f Fix IP address support for Webmin Let’s Encrypt certificates
ⓘ 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.

https://github.com/webmin/webmin/commit/a56748a3fc136ddaa6d24a626d100beb9a8b870a#r188893457
2026-06-16 03:15:02 +02:00
Jamie Cameron 804591f892 Merge branch 'master' of github.com:webmin/webmin 2026-06-13 18:51:30 -07:00
Jamie Cameron a56748a3fc Add support for IP-based lets encrypt certs, with version 5.3 of certbot 2026-06-13 18:49:12 -07:00
Ilia Ross 0d4c65ec04 Fix to create custom temp dirs after validation 2026-06-08 18:53:57 +02:00
Ilia Ross d788bbe9c2 Fix to add a placeholder to tempdir field 2026-06-06 22:49: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 80497c60b9 Update comment 2026-06-06 12:59:44 +02:00
Ilia Ross 6026a20424 Fix LE renewal to schedule by elapsed interval
The Webmin SSL LE renewal setting is labeled as "Months between automatic renewal", but it was previously saved as a calendar-style cron month expression like `*/N`.

That is not the same as an elapsed renewal interval. Webmin’s cron matcher evaluates month schedules against calendar month numbers, so values like `*/5`, `*/12`, or values above `12` do not reliably mean “renew every N months”. This could cause uneven or dangerously late renewal timing.

This changes the renewal job to use Webmin cron’s elapsed `interval` support instead of calendar-month matching.

- Saves automatic renewal as `renew * 30 * 24 * 60 * 60` seconds.
- Clears the cron time fields so the scheduler uses the interval path only.
- Keeps `months => '*/N'` so the SSL UI can continue to display the saved renewal value.
- Resets the renewal timer only after a newly issued certificate.
- Preserves the existing renewal timer for settings-only saves.
- Migrates existing month-based Let's Encrypt renewal jobs during postinstall.
2026-06-06 00:22:19 +02:00
Ilia Ross 501bddabc8 Fix to make temp dir perms message translatable 2026-06-05 22:13:48 +02:00
Ilia Ross e434d0b138 Fix to use a variable for default perms 2026-06-05 22:06:49 +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
Ilia Ross 435d2db4c6 Fix to use stronger defaults for generated keys
https://github.com/webmin/webmin/issues/2728
2026-05-31 20:42:33 +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 9dccd2cdce Add comments
[no-build]
2026-05-11 21:16:26 +02:00
Ilia Ross 1645cadc91 Fix stored passphrase file lookup
* Note: Make passphrase lookup use the same fallback path for full fingerprints, key IDs, and legacy generic passphrase files.

https://forum.virtualmin.com/t/usermin-gpg-encryption/136781/8?u=ilia
2026-05-11 21:14:12 +02:00
Joe Cooper 241abfe719 Add trusted_proxies config 2026-05-10 01:19:01 -05:00
Ilia Ross a7afa3a4f6 Update translations 2026-04-24 22:36:48 +02:00
Ilia Ross db17606643 Fix clarify remember-me authentication option label
https://github.com/webmin/webmin/issues/2674
2026-04-24 22:35:03 +02:00
Ilia Ross d567b09d24 Fix to handle Certbot standalone port conflicts
* Note: Add Certbot port-80 warnings and shared runtime checks, while respecting pre-request hooks that may free the port before standalone validation runs.

https://github.com/webmin/webmin/issues/2669#issuecomment-4274711184
2026-04-19 02:00:21 +02:00
Ilia Ross 12069d87af Fix to redirect to SSL edit page with Let's Encrypt tab
https://github.com/webmin/webmin/commit/544703c1b8de8c3b5a2f141efeda808f436e7ef3#r182819336
2026-04-19 00:11:17 +02:00
Ilia Ross 6c211e721c Update translations 2026-04-18 19:50:53 +02:00
Ilia Ross bb39d752a9 Update description text and UX 2026-04-18 19:50:26 +02:00
Ilia Ross ae35b100c2 Update tiny ACME client 2026-04-18 19:35:27 +02:00
Ilia Ross 84c50bba95 Update translations 2026-04-18 19:35:09 +02:00
Ilia Ross 544703c1b8 Add custom ACME server support to Webmin SSL renewal
* Note: Adds support for custom ACME directory URLs in Webmin’s SSL certificate flow, including optional EAB credentials, renewal persistence, and compatibility fixes for saved validation modes.

https://github.com/webmin/webmin/issues/2669
2026-04-18 19:34:03 +02:00
Ilia Ross 44c7b36160 Fix saved LE validation mode handling
https://github.com/webmin/webmin/issues/2669
2026-04-18 14:59:51 +02:00
Ilia Ross 4d680b1ea9 Fix SHA512/yescrypt error messages to reflect crypt() support
https://github.com/webmin/webmin/issues/2656
2026-04-17 14:36:27 +02:00
Ilia Ross a293fff996 Fix to default TOTP QR generation to QRCode::Encoder
Webmin now uses the bundled QRCode::Encoder implementation by default to generate TOTP QR codes locally and inline, without relying on qr.cgi or external services.

This encoder requires Perl 5.24 or newer, so qrencode is no longer included as a recommended package dependency. On older systems where the bundled encoder cannot run, admins can still install qrencode manually to restore QR generation support.

Systems old enough to lack Perl 5.24 are typically already well past their supported security lifecycle, so keeping qrencode preinstalled by default is no longer treated as a packaging requirement. When neither option is available, Webmin falls back cleanly to manual TOTP setup using the shared secret.

https://github.com/webmin/webmin/issues/2667#issuecomment-4247431279

[no-build]
2026-04-16 23:08:00 +02:00
Ilia Ross ac8cbf57f9 Fix to handle HTTPS update sources with outbound SSL fallback 2026-04-10 18:56:41 +02:00
Ilia Ross 3f3a84c830 Fix to normalize URLs (more)
https://github.com/webmin/webmin/issues/2663
2026-04-10 15:27:28 +02:00
Ilia Ross dde3f1642e Fix to normalize URLs
https://github.com/webmin/webmin/issues/2663
2026-04-10 13:45:14 +02:00
Ilia Ross d2b4fa89c5 Fix to match short GPG key IDs to full fingerprints
https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/32?u=ilia
2026-03-29 15:20:10 +02:00
Ilia Ross 30f08f73fb Fix to support newer GnuPG passphrase handling
* Note: Use loopback pinentry for decrypt operation and retry decryption with the discovered secret key's stored passphrase on newer GnuPG versions

https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/26?u=ilia
2026-03-26 11:48:40 +02:00
Ilia Ross e499b5b3a5 Fix to use loopback pinentry mode for GPG passphrase handling
https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/19?u=ilia
2026-03-25 18:30:13 +02:00
Ilia Ross 443cf449eb Fix to use loopback pinentry for GPG decryption
https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/19?u=ilia
2026-03-25 12:52:26 +02:00