This PR stops Miniserv from starting scheduled jobs while run-postinstalls.pl is running, so jobs never execute against half-updated module code or config.
Miniserv defers all jobs, including startup jobs, while any marker belongs to a live process, and discards markers left by runners that died or that are older than an hour.
The pause is best-effort, as a failure to create the marker is reported but never blocks post-installs.
By the way, this issue was not reported by anyone. I discovered it while running many other extensive tests.
This PR stops treating `rpc=0` as a safe-user restriction, restoring File Manager ops and admin features for fully privileged accounts created with RPC disabled.
Preserve explicit `_safe` restrictions and product roles.
Regression tests and Perl syntax checks pass.
Fixes https://github.com/webmin/webmin/issues/2837
This PR adds a "Redirect all requests" option to the server block and location URL Re-Writing pages in the Nginx Webserver module, backed by the Nginx return directive with a choice of 301, 302, 303, 307 or 308.
The existing rewrite table only offers the redirect and permanent flags, which map to 302 and 301. The other codes requested on the forum are not supported by rewrite at all, so they can only be provided through return.
The new option only manages return directives that are redirects. A bare URL form such as return https://example.com/; is shown as a 302, while non-redirect uses like return 404; are hidden from the page and never modified or removed.
Example of the resulting config for a server block:
return 308 "https://example.com$request_uri";
Fixes https://forum.virtualmin.com/t/137940
ⓘ Values with a # were written unquoted, so on the next read the module took the # as the start of a comment and lost the rest of the line.
For example, a redirect saved as return 301 https://example.com/docs#install; then showed as no redirect on the page, and re-saving it added a duplicate rewrite_log directive that Nginx rejected.
So, before the fix, saving a redirect to https://example.com/docs#install wrote:
return 301 https://example.com/docs#install;
rewrite_log off;
On the next read the module dropped everything after the #, so it saw one merged line:
return 301 https://example.com/docs rewrite_log off;
The redirect disappeared from the page, and saving again appended a second rewrite_log off;, which Nginx rejects as a duplicate.
After the fix the same save writes:
return 301 "https://example.com/docs#install";
rewrite_log off;
Nginx treats the quoted and unquoted forms identically, and the module reads it back correctly.
ⓘ Decode octal-escaped spaces when reading /etc/mtab, as is already done for /etc/fstab, so dashboard disk usage no longer runs df on non-existent paths and fills the error log.
Also quote the path passed to df -i, and parse df output from the numeric columns so a device name containing a space, such as a ZFS dataset, no longer shifts the values.
Fixes https://github.com/webmin/webmin/issues/2833
ⓘ Run cp and mv through backquote_logged and capture their stderr, so the actual command error is shown instead of an unrelated $! value.
https://github.com/webmin/webmin/issues/2834
The file was regenerated when master added acl/forgot_sudouser, and the
regeneration dropped the trailing newline. All 481 files in this branch
now end with one.