Skip to content

fix(session): close null user - #9385

Merged
max-nextcloud merged 1 commit into
mainfrom
fix/close-session-without-login
Nov 2, 2026
Merged

max-nextcloud merged 1 commit into
mainfrom
fix/close-session-without-login

Conversation

@alperozturk96

@alperozturk96 alperozturk96 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

📝 Summary

Pressing back from Android Files client calls close function however user was null this was causing 423 LOCKED on text file thus Notes app fail to sync. As fallback we can get user via documentId, sessionId, sessionToken

Android Files PR: nextcloud/android#17822

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

@max-nextcloud

Copy link
Copy Markdown
Collaborator

Hi @alperozturk96

Thanks a lot for your PR. I have to admit I don't quite understand the situation yet. I'm trying to figure out, why text would respond with a 423.

I assume you tested this and it fixes the issue you were seeing, right?

@max-nextcloud

Copy link
Copy Markdown
Collaborator

My first assumption would be that the controller would respond with a 403 (forbidden) - see https://github.com/nextcloud/text/blob/main/lib/Middleware/SessionMiddleware.php#L176 .

Locked 423 sounds much more like caused by files_lock.

Ahh... now I get it. The original problem was the session not being closed so the file was still locked. Solving this by clicking the close button triggered a request that failed (403 most likely) which meant the lock continued to exist and 423 response remained.

Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud
max-nextcloud force-pushed the fix/close-session-without-login branch from fb439fc to 599abe6 Compare November 2, 2026 10:51
@max-nextcloud

Copy link
Copy Markdown
Collaborator

/backport to stable35

@max-nextcloud

Copy link
Copy Markdown
Collaborator

@alperozturk96 we reworked the session handling in 35 quite a bit. Are you also seeing this problem in previous versions?
We'll need to check if we need further backports.

@alperozturk96

alperozturk96 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@alperozturk96 we reworked the session handling in 35 quite a bit. Are you also seeing this problem in previous versions? We'll need to check if we need further backports.

Not sure about previous versions but it still should be the case because,

$this->userSession->getUser();

Why this should only fail here since old versions also using same approach, no?

@max-nextcloud
max-nextcloud merged commit 1820ad3 into main Nov 2, 2026
68 of 70 checks passed
@max-nextcloud
max-nextcloud deleted the fix/close-session-without-login branch November 2, 2026 12:33
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.

2 participants