diff options
author | Tobia De Koninck <LEDfan@users.noreply.github.com> | 2020-01-03 10:48:17 +0300 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2020-02-03 18:00:03 +0300 |
commit | 6cc23b170a326d7fee7afc521cef9282ce776fe4 (patch) | |
tree | d9dc2a2f9ca3391ed5cd8cae0b9abac0925ffecb /apps/files/lib | |
parent | 0b33aefc86cbbc76644d17222c125dbb7f5dd225 (diff) |
Prevent transferring data to user which never loggedin
Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Service/OwnershipTransferService.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 8af894a0167..3dc55615c95 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -87,7 +87,7 @@ class OwnershipTransferService { $sourcePath = rtrim($sourceUid . '/files/' . $path, '/'); // target user has to be ready - if (!$this->encryptionManager->isReadyForUser($destinationUid)) { + if ($destinationUser->getLastLogin() === 0 || !$this->encryptionManager->isReadyForUser($destinationUid)) { throw new TransferOwnershipException("The target user is not ready to accept files. The user has at least to have logged in once.", 2); } |