Skip to content

Commit

Permalink
Update licence of LoadAdditionalScriptsEvent to 3.0 or later
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed May 7, 2024
1 parent 1e65890 commit 7a28ad5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Sabre/PublicRootCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ public function getChildForPrincipal(array $principalInfo): PublicAlbumRoot {
/**
* Returns a child object, by its token.
*
* @param string $name
* @param string $token
*
* @throws NotFound
*
* @return DAV\INode
*/
public function getChild($name) {
public function getChild($token) {

Check failure on line 68 in lib/Sabre/PublicRootCollection.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

ParamNameMismatch

lib/Sabre/PublicRootCollection.php:68:27: ParamNameMismatch: Argument 1 of OCA\Photos\Sabre\PublicRootCollection::getChild has wrong name $token, expecting $name as defined by Sabre\DAV\ICollection::getChild (see https://psalm.dev/230)
$this->throttler->sleepDelayOrThrowOnMax($this->request->getRemoteAddress(), self::BRUTEFORCE_ACTION);

if (is_null($name)) {
if (is_null($token)) {
throw new \Sabre\DAV\Exception\Forbidden();
}

$albums = $this->albumMapper->getSharedAlbumsForCollaboratorWithFiles($name, AlbumMapper::TYPE_LINK);
$albums = $this->albumMapper->getSharedAlbumsForCollaboratorWithFiles($token, AlbumMapper::TYPE_LINK);

if (count($albums) !== 1) {
$this->throttler->registerAttempt(self::BRUTEFORCE_ACTION, $this->request->getRemoteAddress());
Expand Down

0 comments on commit 7a28ad5

Please sign in to comment.