Skip to content

Commit 94c1fdf

Browse files
authored
Merge pull request #7391 from nextcloud/backport/7389/stable30
[stable30] Revert "debug(SessionMiddleware): Log if we have an invalid session"
2 parents e845c8b + bcee782 commit 94c1fdf

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

lib/Middleware/SessionMiddleware.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
use OCP\IUserSession;
3131
use OCP\Share\Exceptions\ShareNotFound;
3232
use OCP\Share\IManager as ShareManager;
33-
use Psr\Log\LoggerInterface;
3433
use ReflectionException;
3534

3635
class SessionMiddleware extends Middleware {
@@ -44,7 +43,6 @@ public function __construct(
4443
private IRootFolder $rootFolder,
4544
private ShareManager $shareManager,
4645
private IL10N $l10n,
47-
private LoggerInterface $logger,
4846
) {
4947
}
5048

@@ -101,15 +99,11 @@ private function assertDocumentSession(ISessionAwareController $controller): voi
10199

102100
$session = $this->sessionService->getValidSession($documentId, $sessionId, $token);
103101
if (!$session) {
104-
// We spotted occurrences of this in combination with out-of-sync situations, so let's log it for now.
105-
$this->logger->error('Could not find document session for document id' . $documentId . ' and session id ' . $sessionId);
106102
throw new InvalidSessionException();
107103
}
108104

109105
$document = $this->documentService->getDocument($documentId);
110106
if (!$document) {
111-
// We spotted occurrences of this in combination with out-of-sync situations, so let's log it for now.
112-
$this->logger->error('Could not find document for documentId ' . $documentId);
113107
throw new InvalidSessionException();
114108
}
115109

0 commit comments

Comments
 (0)