-
Notifications
You must be signed in to change notification settings - Fork 109
debug(SessionMiddleware): Log if we have an invalid session #7372
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
Conversation
lib/Middleware/SessionMiddleware.php
Outdated
| // We spotted occurrences of this in combination with out-of-sync situations, so let's log it for now. | ||
| $this->logger->error('Invalid session: ' . $exception->getMessage(), ['exception' => $exception]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can do this more specific and put it in here:
https://github.com/nextcloud/text/blob/main/lib/Middleware/SessionMiddleware.php#L94 as that's the function that's checked on push requests to a non public session and would throw an InvalidSessionException.
That would leave out exceptions caused elsewhere from the logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, pushed a change now. Is this how you meant it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly!
We have spotted occurrences of this in combination with out-of-sync situations, so let's log it for now to better debug when this happens. Signed-off-by: Jonas <[email protected]>
8f38976 to
7db6def
Compare
|
/backport to stable31 |
|
/backport to stable30 |
We have spotted occurrences of this in combination with out-of-sync situations, so let's log it for now to better debug when this happens.
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)