* Thu Sep 25 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-2.sme

- CSP relaxed policy
- revert authentication
- httpd syntax fix
- smanager improvement
This commit is contained in:
2025-09-25 12:38:42 -04:00
parent c8ce77259d
commit fcb9a8fbf7
4 changed files with 21 additions and 15 deletions

View File

@@ -22,18 +22,16 @@ $ua->insecure(1);
sub main {
my $c = shift;
my $title = $c->l('psi_phpsysinfo_panel');
my $php_url = 'https://sme11.thereadclan.me.uk/phpsysinfo/index.php?disp=static';
#my $first_line = q{<meta http-equiv="Content-Security-Policy" content="default-src 'unsafe-inline' 'unsafe-eval' 'self'" />};
#my $second_line = q{<meta name="Description" content="phpSysInfo is a customizable PHP script that displays information about your system nicely" />};
my $host = $c->req->url->to_abs->host;
my $php_url = "https://".$host."/phpsysinfo/index.php?disp=static";
my $php_url2 = "https://".$host."/phpsysinfo/index.php?disp=bootstrap";
$ua->get($php_url => sub {
my ($ua, $tx) = @_;
if ($tx->res->is_success) {
my $php_content = $tx->res->body;
my ($phpsysinfo_html) = $php_content =~ m{<body[^>]*>(.*?)</body>}si;
$phpsysinfo_html =~ s/^( SME Server|<BR>Copyright \(c\)).*\n//gmi;
# Insert $first_line before $second_line - supressing CSP
#$phpsysinfo_html =~ s/(\Q$second_line\E)/$first_line\n$1/;
$c->stash(title => $title, phpsysinfo => $phpsysinfo_html, php_url => $php_url);
$c->stash(title => $title, phpsysinfo => $phpsysinfo_html, php_url => $php_url, php_url2 => $php_url2);
$c->render(template => 'phpsysinfo');
} else {
my $code = $tx->res->code // 'No code';
@@ -49,4 +47,4 @@ sub main {
# $c->proxy_to('https://sme11.thereadclan.me.uk/phpsysinfo/index.php?disp=static');
#}
1;
1;