debug(SessionMiddleware): Log if we have an invalid session#7372
Merged
Conversation
lib/Middleware/SessionMiddleware.php
Outdated
Comment on lines
176
to
177
| // 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]); |
Collaborator
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
Good point, pushed a change now. Is this how you meant it?
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 <jonas@freesources.org>
8f38976 to
7db6def
Compare
max-nextcloud
approved these changes
Jun 30, 2025
Member
Author
|
/backport to stable31 |
Member
Author
|
/backport to stable30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)