summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php')
-rw-r--r--apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
index 6ca0282d81f..c51c5d43589 100644
--- a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
@@ -50,6 +50,7 @@ use OCP\IUserManager;
use OCP\Notification\IManager as INotificationManager;
use OCP\Share;
use OCP\Share\Exceptions\ShareNotFound;
+use OCP\Share\IManager;
use OCP\Share\IShare;
use OCP\Util;
@@ -70,6 +71,9 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
/** @var IUserManager */
private $userManager;
+ /** @var IManager */
+ private $shareManager;
+
/** @var ICloudIdManager */
private $cloudIdManager;
@@ -102,6 +106,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
* @param AddressHandler $addressHandler
* @param ILogger $logger
* @param IUserManager $userManager
+ * @param IManager $shareManager
* @param ICloudIdManager $cloudIdManager
* @param IActivityManager $activityManager
* @param INotificationManager $notificationManager
@@ -116,6 +121,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
AddressHandler $addressHandler,
ILogger $logger,
IUserManager $userManager,
+ IManager $shareManager,
ICloudIdManager $cloudIdManager,
IActivityManager $activityManager,
INotificationManager $notificationManager,
@@ -130,6 +136,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
$this->addressHandler = $addressHandler;
$this->logger = $logger;
$this->userManager = $userManager;
+ $this->shareManager = $shareManager;
$this->cloudIdManager = $cloudIdManager;
$this->activityManager = $activityManager;
$this->notificationManager = $notificationManager;
@@ -805,6 +812,16 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
return true;
}
+ if ($share->getShareType() === IShare::TYPE_CIRCLE) {
+ try {
+ $knownShare = $this->shareManager->getShareByToken($token);
+ if ($knownShare->getId() === $share->getId()) {
+ return true;
+ }
+ } catch (ShareNotFound $e) {
+ }
+ }
+
throw new AuthenticationFailedException();
}