Skip to content

fix: Prevent forbidden token in web editor after screen restoration#1968

Open
benjaminVadon wants to merge 3 commits intomainfrom
fix-document-preview-token
Open

fix: Prevent forbidden token in web editor after screen restoration#1968
benjaminVadon wants to merge 3 commits intomainfrom
fix-document-preview-token

Conversation

@benjaminVadon
Copy link
Contributor

closes #1953

@benjaminVadon benjaminVadon self-assigned this Feb 27, 2026
@benjaminVadon benjaminVadon added the quick A pull request consisting of a few lines label Feb 27, 2026
@sirambd sirambd requested a review from Copilot March 9, 2026 09:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a regression where the OnlyOffice web editor can load with an invalid/forbidden Authorization token after the screen is restored, leading to a 403 | FORBIDDEN in the embedded WebView.

Changes:

  • Defers WebView initialization until intent extras are read safely (avoids !!).
  • Retrieves the current user/token via AccountUtils.requestCurrentUser() before building the Authorization header.
  • Refactors WebView setup into helper methods and adds a dedicated WebViewClient builder.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ll init, like if the process was killed before screen restoration

# Conflicts:
#	app/src/main/java/com/infomaniak/drive/ui/OnlyOfficeActivity.kt
@benjaminVadon benjaminVadon force-pushed the fix-document-preview-token branch from 6e14dc5 to d5f94f9 Compare March 10, 2026 12:15
@sonarqubecloud
Copy link

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

Labels

quick A pull request consisting of a few lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

403 when leaving a document edit view in the background

2 participants