Fix XML-RPC CGI execution under miniserv
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

ⓘ Allow xmlrpc.cgi to run when invoked through Webmin's internal CGI do() path while preserving require-safe helper tests, and add regression coverage for CGI header emission.

https://github.com/webmin/webmin/pull/2763#issuecomment-4726296870
This commit is contained in:
Ilia Ross
2026-06-17 15:06:18 +02:00
parent 8157ff60d2
commit 74fd0ca12d
2 changed files with 65 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ use WebminCore;
use POSIX;
use Socket;
unless (caller) {
if (!caller || $ENV{'GATEWAY_INTERFACE'}) {
if (!$ENV{'GATEWAY_INTERFACE'}) {
# Command-line mode
@@ -157,7 +157,7 @@ if (!$command_line) {
}
print $xmlrv;
} # end of unless (caller)
} # end of script/CGI request handler
# parse_xml_value(&value)
# Given a <value> object, returns a Perl scalar, hash ref or array ref for
@@ -327,4 +327,3 @@ $xmlerr .= "</fault>\n";
$xmlerr .= "</methodResponse>\n";
return $xmlerr;
}