1
0
espelhamento de https://github.com/nextcloud/server.git sincronizado 2024-07-29 20:15:55 +02:00

block webdav access if share is not readable

Esse commit está contido em:
Bjoern Schiessle 2016-06-08 14:59:06 +02:00 commit de Lukas Reschke
commit 66d853680c
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados
ID da chave GPG: 9AB0ADB949B6898C

Ver arquivo

@ -67,8 +67,13 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, func
$share = $authBackend->getShare();
$owner = $share->getShareOwner();
$isWritable = $share->getPermissions() & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE);
$isReadable = $share->getPermissions() & \OCP\Constants::PERMISSION_READ;
$fileId = $share->getNodeId();
if (!$isReadable) {
return false;
}
if (!$isWritable) {
\OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {
return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE));