Skip to content

Conversation

@artonge
Copy link
Contributor

@artonge artonge commented Feb 21, 2024

No description provided.

@artonge artonge self-assigned this Feb 21, 2024
@artonge artonge added 3. to review Waiting for reviews feature: versions javascript php Pull requests that update Php code labels Feb 21, 2024
@artonge artonge added this to the Nextcloud 29 milestone Feb 21, 2024
@artonge artonge marked this pull request as ready for review February 21, 2024 15:11
@artonge
Copy link
Contributor Author

artonge commented Feb 21, 2024

/backport to stable28

@artonge
Copy link
Contributor Author

artonge commented Feb 21, 2024

/backport to stable27

@artonge
Copy link
Contributor Author

artonge commented Feb 21, 2024

/backport to stable26

@artonge artonge force-pushed the artonge/fix/prevent_download_of_shares branch from d4726e9 to 7f6ff98 Compare February 21, 2024 15:12
$currentUserId = $this->userFolder?->getOwner()?->getUID();
// The version source file is relative to the owner storage.
// But we need the node from the current user perspective.
if ($node->getOwner()->getUID() !== $currentUserId) {

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getUID on possibly null value
// The version source file is relative to the owner storage.
// But we need the node from the current user perspective.
if ($node->getOwner()->getUID() !== $currentUserId) {
$nodes = $this->userFolder->getById($node->getId());

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method getById on possibly null value
// The version source file is relative to the owner storage.
// But we need the node from the current user perspective.
if ($node->getOwner()->getUID() !== $currentUserId) {
$nodes = $this->userFolder->getById($node->getId());

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of OCP\Files\Folder::getById cannot be null, possibly null value provided
// Allow view-only plugin for webdav requests
$this->server->addPlugin(new ViewOnlyPlugin(
$logger
\OC::$server->getUserFolder(),

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OC\Server::getUserFolder has been marked as deprecated
}

if ($sourceFile->getOwner()?->getUID() !== $currentUserId) {
$nodes = $this->rootFolder->getUserFolder($currentUserId)->getById($sourceFile->getId());

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of OCP\Files\Folder::getById cannot be null, possibly null value provided
@artonge artonge force-pushed the artonge/fix/prevent_download_of_shares branch from 7f6ff98 to 18b32e8 Compare February 21, 2024 15:48
@artonge
Copy link
Contributor Author

artonge commented Feb 27, 2024

/backport 8e95d0f to stable25

@artonge
Copy link
Contributor Author

artonge commented Feb 27, 2024

/backport 741dec2 37d0fd1 to stable25

@artonge
Copy link
Contributor Author

artonge commented Feb 27, 2024

/backport 741dec2 37d0fd1 to stable24

@artonge
Copy link
Contributor Author

artonge commented Feb 27, 2024

/backport 741dec2 37d0fd1 to stable23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: versions javascript php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants