Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower some session warnings to debug level #41195

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/private/User/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ private function validateToken($token, $user = null) {
try {
$dbToken = $this->tokenProvider->getToken($token);
} catch (InvalidTokenException $ex) {
$this->logger->warning('Session token is invalid because it does not exist', [
$this->logger->debug('Session token is invalid because it does not exist', [
'app' => 'core',
'user' => $user,
'exception' => $ex,
Expand All @@ -802,12 +802,11 @@ private function validateToken($token, $user = null) {
'app' => 'core',
'user' => $dbToken->getUID(),
]);

return false;
}

if (!$this->checkTokenCredentials($dbToken, $token)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inside this method there are critical paths that might still be worth logging. That is every time \OC\Authentication\Token\IProvider::invalidateToken or markPasswordInvalid is called, for example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a follow up PR? Otherwise, feel free to commit them as output messages would require a deeper knowledge of what they exactly accomplish, which I don't have. 🦺

$this->logger->warning('Session token credentials are invalid', [
$this->logger->debug('Session token credentials are invalid', [
'app' => 'core',
'user' => $user,
]);
Expand Down
Loading