Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.htaccess41
m---------3rdparty0
-rw-r--r--lib/private/Files/ObjectStore/S3ConnectionTrait.php12
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php5
4 files changed, 46 insertions, 12 deletions
diff --git a/.htaccess b/.htaccess
index 2a6a0cbfac6..4986f7d380f 100644
--- a/.htaccess
+++ b/.htaccess
@@ -7,6 +7,10 @@
<IfModule mod_proxy_fcgi.c>
SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
+ <IfModule mod_lsapi.c>
+ SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
+ RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
+ </IfModule>
</IfModule>
<IfModule mod_env.c>
@@ -48,6 +52,8 @@
Header set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>
+
+# PHP 7.x
<IfModule mod_php7.c>
php_value mbstring.func_overload 0
php_value default_charset 'UTF-8'
@@ -56,6 +62,30 @@
SetEnv htaccessWorking true
</IfModule>
</IfModule>
+
+# PHP 8+
+<IfModule mod_php.c>
+ php_value mbstring.func_overload 0
+ php_value default_charset 'UTF-8'
+ php_value output_buffering 0
+ <IfModule mod_env.c>
+ SetEnv htaccessWorking true
+ </IfModule>
+</IfModule>
+
+<IfModule mod_mime.c>
+ AddType image/svg+xml svg svgz
+ AddEncoding gzip svgz
+</IfModule>
+
+<IfModule mod_dir.c>
+ DirectoryIndex index.php index.html
+</IfModule>
+
+<IfModule pagespeed_module>
+ ModPagespeed Off
+</IfModule>
+
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} DavClnt
@@ -68,15 +98,6 @@
RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]
RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>
-<IfModule mod_mime.c>
- AddType image/svg+xml svg svgz
- AddEncoding gzip svgz
-</IfModule>
-<IfModule mod_dir.c>
- DirectoryIndex index.php index.html
-</IfModule>
+
AddDefaultCharset utf-8
Options -Indexes
-<IfModule pagespeed_module>
- ModPagespeed Off
-</IfModule>
diff --git a/3rdparty b/3rdparty
-Subproject 6966f162551a50d7b353969c66102b2d2e0b124
+Subproject 40760a4a1a27329d466579e360ae199e44f1f91
diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php
index c72fa48d247..47c20d96d53 100644
--- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php
+++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php
@@ -57,6 +57,9 @@ trait S3ConnectionTrait {
/** @var int */
protected $timeout;
+ /** @var string */
+ protected $proxy;
+
/** @var int */
protected $uploadPartSize;
@@ -71,6 +74,7 @@ trait S3ConnectionTrait {
$this->test = isset($params['test']);
$this->bucket = $params['bucket'];
+ $this->proxy = isset($params['proxy']) ? $params['proxy'] : false;
$this->timeout = !isset($params['timeout']) ? 15 : $params['timeout'];
$this->uploadPartSize = !isset($params['uploadPartSize']) ? 524288000 : $params['uploadPartSize'];
$params['region'] = empty($params['region']) ? 'eu-west-1' : $params['region'];
@@ -86,6 +90,10 @@ trait S3ConnectionTrait {
return $this->bucket;
}
+ public function getProxy() {
+ return $this->proxy;
+ }
+
/**
* Returns the connection
*
@@ -123,8 +131,8 @@ trait S3ConnectionTrait {
'csm' => false,
'use_arn_region' => false,
];
- if (isset($this->params['proxy'])) {
- $options['request.options'] = ['proxy' => $this->params['proxy']];
+ if ($this->getProxy()) {
+ $options['http'] = [ 'proxy' => $this->getProxy() ];
}
if (isset($this->params['legacy_auth']) && $this->params['legacy_auth']) {
$options['signature_version'] = 'v2';
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index b57e4d9846f..bb71306c17d 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -69,6 +69,11 @@ trait S3ObjectTrait {
],
];
+ if ($this->getProxy()) {
+ $opts['http']['proxy'] = $this->getProxy();
+ $opts['http']['request_fulluri'] = true;
+ }
+
$context = stream_context_create($opts);
return fopen($request->getUri(), 'r', false, $context);
});