9 |
<FilesMatch \.php\$> |
<FilesMatch \.php\$> |
10 |
SetHandler "proxy:unix:/var/run/php-fpm/php$version-$name.sock|fcgi://localhost" |
SetHandler "proxy:unix:/var/run/php-fpm/php$version-$name.sock|fcgi://localhost" |
11 |
</FilesMatch> |
</FilesMatch> |
|
diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php.ini/40DataHandling smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php.ini/40DataHandling |
|
|
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php.ini/40DataHandling 2020-03-24 22:47:45.397000000 -0400 |
|
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php.ini/40DataHandling 2020-03-24 23:03:00.496000000 -0400 |
|
|
@@ -6,7 +6,11 @@ |
|
|
my $ms = $phpcur->prop(PostMaxSize) || $php{PostMaxSize} || "20M"; |
|
|
$OUT .= "$ms"; |
|
|
} |
|
|
-auto_prepend_file = |
|
|
+auto_prepend_file = { |
|
|
+ my $appf = $phpcur->prop(AutoPrependFile) || $php{AutoPrependFile} || "enabled"; |
|
|
+ $appf = ( "$appf" eq "enabled" ) ? "/usr/share/php/auth_translation.php" : ""; |
|
|
+ $OUT .= "$appf"; |
|
|
+} |
|
|
auto_append_file = |
|
|
default_mimetype = "text/html" |
|
|
default_charset = "UTF-8" |
|
12 |
diff -Nur smeserver-php-3.0.0.old/root/usr/share/php/auth_translation.php smeserver-php-3.0.0/root/usr/share/php/auth_translation.php |
diff -Nur smeserver-php-3.0.0.old/root/usr/share/php/auth_translation.php smeserver-php-3.0.0/root/usr/share/php/auth_translation.php |
13 |
--- smeserver-php-3.0.0.old/root/usr/share/php/auth_translation.php 1969-12-31 19:00:00.000000000 -0500 |
--- smeserver-php-3.0.0.old/root/usr/share/php/auth_translation.php 1969-12-31 19:00:00.000000000 -0500 |
14 |
+++ smeserver-php-3.0.0/root/usr/share/php/auth_translation.php 2020-03-24 22:56:30.995000000 -0400 |
+++ smeserver-php-3.0.0/root/usr/share/php/auth_translation.php 2020-03-24 22:56:30.995000000 -0400 |
26 |
+ $_SERVER['REMOTE_USER']= $_SERVER['REDIRECT_REMOTE_USER']; |
+ $_SERVER['REMOTE_USER']= $_SERVER['REDIRECT_REMOTE_USER']; |
27 |
+} |
+} |
28 |
+?> |
+?> |
29 |
|
diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/custom.conf/10All smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/custom.conf/10All |
30 |
|
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/custom.conf/10All 2020-03-25 23:28:48.448000000 -0400 |
31 |
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/custom.conf/10All 2020-03-25 23:51:42.755000000 -0400 |
32 |
|
@@ -28,14 +28,17 @@ |
33 |
|
my $max_children = $pool->prop('MaxChildren') || '15'; |
34 |
|
my $display_errors = $pool->prop('DisplayErrors') || 'disabled'; |
35 |
|
my $log_errors = $pool->prop('LogErrors') || 'disabled'; |
36 |
|
+ my $autoprepend = $pool->prop('AutoPrependFile') || 'enabled'; |
37 |
|
|
38 |
|
# Format vars |
39 |
|
+ my $autoprep = ( $autoprepend eq "disabled") ? "" : "/usr/share/pear/auth_translation.php"; |
40 |
|
+ my $autoprepath = ( $autoprepend eq "disabled") ? "" : ",/usr/share/php/"; |
41 |
|
$file_upload = ($file_upload =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
42 |
|
$allow_url_fopen = ($allow_url_fopen =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
43 |
|
$display_errors = ($display_errors =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
44 |
|
$log_errors = ($log_errors =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
45 |
|
$disabled_functions = join(', ', split /[,;:]/, $disabled_functions); |
46 |
|
- $open_basedir = (defined $open_basedir) ? 'php_admin_value[open_basedir] = ' . join(':', split(/[,;:]/, $open_basedir)) : |
47 |
|
+ $open_basedir = (defined $open_basedir) ? 'php_admin_value[open_basedir] = ' . join(':', split(/[,;:]/, $open_basedir . $autoprepath)) : |
48 |
|
'; open_basedir is not set'; |
49 |
|
|
50 |
|
$OUT .=<<"_EOF"; |
51 |
|
@@ -72,6 +75,7 @@ |
52 |
|
php_admin_flag[file_upload] = $file_upload |
53 |
|
php_admin_flag[session.cookie_httponly] = on |
54 |
|
php_admin_flag[allow_url_include] = off |
55 |
|
+php_admin_value[auto_prepend_file] = $autoprep |
56 |
|
php_admin_value[session.save_handler] = files |
57 |
|
$open_basedir |
58 |
|
|
59 |
|
diff -Nur 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 |
60 |
|
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2020-03-25 23:28:48.448000000 -0400 |
61 |
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2020-03-26 00:03:17.799000000 -0400 |
62 |
|
@@ -26,11 +26,15 @@ |
63 |
|
'symlink,exec,dl,shell_exec,' . |
64 |
|
'passthru,phpinfo,' . |
65 |
|
'escapeshellarg,escapeshellcmd'; |
66 |
|
- # Format vars |
67 |
|
+ my $autoprepend = $ibay->prop('PHPAutoPrependFile') || 'enabled'; |
68 |
|
+ |
69 |
|
+ # Format vars |
70 |
|
+ my $autoprep = ( $autoprepend eq "disabled") ? "" : "/usr/share/pear/auth_translation.php"; |
71 |
|
+ my $autoprepath = ( $autoprepend eq "disabled") ? "" : ",/usr/share/php/"; |
72 |
|
$file_upload = ($file_upload =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
73 |
|
$allow_url_fopen = ($allow_url_fopen =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
74 |
|
$disabled_functions = join(', ', split /[,;:]/, $disabled_functions); |
75 |
|
- $open_basedir = join(':', split(/[,;:]/, $open_basedir)); |
76 |
|
+ $open_basedir = join(':', split(/[,;:]/, $open_basedir . $autoprepath)); |
77 |
|
|
78 |
|
$OUT .=<<"_EOF" if ($version eq $PHP_VERSION); |
79 |
|
|
80 |
|
@@ -67,6 +71,7 @@ |
81 |
|
php_admin_flag[session.cookie_httponly] = on |
82 |
|
php_admin_flag[allow_url_include] = off |
83 |
|
php_admin_value[session.save_handler] = files |
84 |
|
+php_admin_value[auto_prepend_file] = $autoprep |
85 |
|
php_admin_value[open_basedir] = $open_basedir |
86 |
|
|
87 |
|
_EOF |
88 |
|
diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings |
89 |
|
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings 2020-03-25 23:28:48.424000000 -0400 |
90 |
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/00Default50Settings 2020-03-26 00:02:32.791000000 -0400 |
91 |
|
@@ -8,7 +8,7 @@ |
92 |
|
php_admin_value[max_input_time] = { $MaxInputTime } |
93 |
|
{ |
94 |
|
if ($OpenBasedir){ |
95 |
|
- $OUT .= "php_admin_value[open_basedir] = " . join( ':', (split(/[;,:]/, $OpenBasedir)) ) . "\n"; |
96 |
|
+ $OUT .= "php_admin_value[open_basedir] = " . join( ':', (split(/[;,:]/, "$OpenBasedir,/usr/share/php/")) ) . "\n"; |
97 |
|
} |
98 |
|
if ($DisableFunctions){ |
99 |
|
$OUT .= "php_admin_value[disable_functions] = " . join( ', ', (split(/[;,:]/, $DisableFunctions)) ) . "\n"; |
100 |
|
@@ -18,4 +18,5 @@ |
101 |
|
php_admin_flag[file_upload] = { $FileUpload } |
102 |
|
php_admin_flag[session.cookie_httponly] = on |
103 |
|
php_admin_flag[allow_url_include] = off |
104 |
|
+php_admin_value[auto_prepend_file] = /usr/share/pear/auth_translation.php |
105 |
|
php_admin_value[session.save_handler] = files |