summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-04-23 19:32:41 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-04-23 19:34:09 +0200
commitba71918ad2f6fb336852fd492e5e819eb38201c9 (patch)
treeed42b73780dfc487f6fc115d16f00f7864b3ee4f /lib/private
parent000f41ba01f7ebb0972e5f5509ebc66931083702 (diff)
downloadnextcloud-server-ba71918ad2f6fb336852fd492e5e819eb38201c9.tar.gz
nextcloud-server-ba71918ad2f6fb336852fd492e5e819eb38201c9.zip
Swift v3 requires setting a scope
Unscoped auth is not guaranteed to return a catalog. So require the scope to be set properly. See https://developer.openstack.org/api-ref/identity/v3/index.html#password-authentication-with-unscoped-authorization Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/ObjectStore/SwiftFactory.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index 85bba573001..caa4774daba 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -108,6 +108,10 @@ class SwiftFactory {
]);
if (isset($this->params['user']) && isset($this->params['user']['name'])) {
+ if (!isset($this->params['scope'])) {
+ throw new StorageAuthException('Scope has to be defined for V3 requests');
+ }
+
return $this->auth(IdentityV3Service::factory($httpClient), $cacheKey);
} else {
return $this->auth(IdentityV2Service::factory($httpClient), $cacheKey);