--- rpms/smeserver-phpki-ng/contribs10/smeserver-phpki-ng-0.3-bz12268-bz12266-bz11440-bz11439.patch 2022/12/14 21:53:40 1.1 +++ rpms/smeserver-phpki-ng/contribs10/smeserver-phpki-ng-0.3-bz12268-bz12266-bz11440-bz11439.patch 2022/12/17 07:11:08 1.2 @@ -198,3 +198,42 @@ diff -Nur --no-dereference smeserver-php + close(RD); + ""; +} +diff -Nur --no-dereference smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass +--- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass 2022-12-17 01:56:20.627000000 -0500 ++++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28phpkiProxyPass 2022-12-17 02:07:46.903000000 -0500 +@@ -48,10 +48,15 @@ + + Require all granted + ++ ++ Require all granted ++ + # and we redirect old config to our new safer script + RewriteEngine On +- RewriteCond %{QUERY_STRING} stage=dl_crl ++ RewriteCond %{QUERY_STRING} stage=dl_crl(&|\$) + RewriteRule ^ /phpki/dl_crl.php? [R=302,L] ++ RewriteCond %{QUERY_STRING} stage=dl_crl_pem(&|\$) ++ RewriteRule ^ /phpki/dl_crl_pem.php? [R=302,L] + + HERE + # safely redirect crl request to php script striping all GET requests +diff -Nur --no-dereference smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/opt/phpki/html/config.php/99writefile smeserver-phpki-ng-0.3/root/etc/e-smith/templates/opt/phpki/html/config.php/99writefile +--- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates/opt/phpki/html/config.php/99writefile 2022-12-17 01:56:20.628000000 -0500 ++++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates/opt/phpki/html/config.php/99writefile 2022-12-17 02:09:54.412000000 -0500 +@@ -2,6 +2,10 @@ + $OUT .= ""; + foreach my $line (@lines) + { ++ chomp $line; ++ next if grep { /^$/ } $line ; ++ push @lines, $_; ++ + $OUT .= "$line\n"; + } + $OUT .= "?>"; +diff -Nur --no-dereference smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates.metadata/opt/phpki/html/config.php smeserver-phpki-ng-0.3/root/etc/e-smith/templates.metadata/opt/phpki/html/config.php +--- smeserver-phpki-ng-0.3.old/root/etc/e-smith/templates.metadata/opt/phpki/html/config.php 1969-12-31 19:00:00.000000000 -0500 ++++ smeserver-phpki-ng-0.3/root/etc/e-smith/templates.metadata/opt/phpki/html/config.php 2022-12-17 02:08:38.149000000 -0500 +@@ -0,0 +1 @@ ++FILTER=sub { $_[0] =~ /^\s*$/ ? '' : $_[0] }