/[smeserver]/rpms/smeserver-php/sme10/smeserver-php-3.0.0-bz10890-allowphpembdedcode.patch
ViewVC logotype

Contents of /rpms/smeserver-php/sme10/smeserver-php-3.0.0-bz10890-allowphpembdedcode.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Mar 8 07:20:02 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-php-3_0_0-44_el7_sme, smeserver-php-3_0_0-47_el7_sme, smeserver-php-3_0_0-31_el7_sme, smeserver-php-3_0_0-28_el7_sme, smeserver-php-3_0_0-45_el7_sme, smeserver-php-3_0_0-48_el7_sme, smeserver-php-3_0_0-43_el7_sme, smeserver-php-3_0_0-46_el7_sme, smeserver-php-3_0_0-41_el7_sme, smeserver-php-3_0_0-30_el7_sme, smeserver-php-3_0_0-29_el7_sme, smeserver-php-3_0_0-42_el7_sme, smeserver-php-3_0_0-34_el7_sme, smeserver-php-3_0_0-37_el7_sme, smeserver-php-3_0_0-40_el7_sme, smeserver-php-3_0_0-35_el7_sme, smeserver-php-3_0_0-32_el7_sme, smeserver-php-3_0_0-33_el7_sme, smeserver-php-3_0_0-38_el7_sme, smeserver-php-3_0_0-39_el7_sme, smeserver-php-3_0_0-36_el7_sme, HEAD
* Mon Mar 08 2021 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-28.sme
- filter non existing php script [SME: 10907]
- allow php embded files per ibay using AllowPHTML [SME: 10890]

1 diff -Nur --no-dereference smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays
2 --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2021-03-08 01:54:56.143000000 -0500
3 +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2021-03-08 02:18:36.512000000 -0500
4 @@ -16,9 +16,10 @@
5 {
6 my $version = PhpFpmVersionToUse($ibay);
7 my $name = lc $key;
8 + my $FilesMathes = ( ($ibay->prop('AllowPHTML') || 'disabled') eq 'enabled' ) ? '(xml|phtml|html|htm|php|phar)': '(phar|php)';
9 $OUT .=<<"_EOF";
10 SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1
11 - <FilesMatch \\.php\$>
12 + <FilesMatch \\.$FilesMathes\$>
13 <If "-f \%\{SCRIPT_FILENAME\}">
14 SetHandler "proxy:unix:/var/run/php-fpm/php$version-$name.sock|fcgi://localhost"
15 </If>
16 diff -Nur --no-dereference smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays
17 --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2021-03-08 01:54:56.139000000 -0500
18 +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2021-03-08 02:18:38.742000000 -0500
19 @@ -26,8 +26,9 @@
20 'passthru,phpinfo,' .
21 'escapeshellarg,escapeshellcmd';
22 my $autoprepend = $ibay->prop('PHPAutoPrependFile') || 'enabled';
23 - my $MailForceSender = $ibay->prop('MailForceSender') || "$name\@$DomainName";
24 - # TODO => check ibay associated domains.
25 + my $MailForceSender = $ibay->prop('MailForceSender') || "$name\@$DomainName"; # TODO => check ibay associated domains.
26 + my $limitExtensions = ( ($ibay->prop('AllowPHTML') || 'disabled') eq 'enabled' ) ? "security.limit_extensions= .php .htm .html .phar .phtml .xml " : "";
27 +
28 # Format vars
29 my $autoprep = ( $autoprepend eq "disabled") ? "" : "/usr/share/php/auth_translation.php";
30 my $autoprepath = ( $autoprepend eq "disabled") ? "" : ",/usr/share/php/";
31 @@ -51,6 +52,7 @@
32 pm.min_spare_servers = 3
33 pm.max_spare_servers = 4
34 pm.max_requests = 1000
35 +$limitExtensions
36 slowlog = /var/log/php/$key/slow.log
37 php_admin_value[session.save_path] = /var/lib/php/$key/session
38 php_admin_value[opcache.file_cache] = /var/lib/php/$key/opcache

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed