Skip to content

Conversation

@mejo-
Copy link
Member

@mejo- mejo- commented Jun 30, 2025

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

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits

@mejo- mejo- self-assigned this Jun 30, 2025
@mejo- mejo- requested a review from max-nextcloud as a code owner June 30, 2025 10:37
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]);
Copy link
Collaborator

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.

Copy link
Member Author

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?

Copy link
Collaborator

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]>
@mejo- mejo- force-pushed the debug/session_invalid_log branch from 8f38976 to 7db6def Compare June 30, 2025 10:55
@mejo- mejo- merged commit e1cb1b9 into main Jun 30, 2025
67 checks passed
@mejo- mejo- deleted the debug/session_invalid_log branch June 30, 2025 13:16
@mejo-
Copy link
Member Author

mejo- commented Jun 30, 2025

/backport to stable31

@mejo-
Copy link
Member Author

mejo- commented Jun 30, 2025

/backport to stable30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants