Skip to content

Commit 861778a

Browse files
authored
fix: OnlyOffice document link shows blank page when session expires - EXO-82725 (#1806)
Prior to this change, opening an editable document displayed a blank page if the user was not logged in. This issue was caused by a null pointer exception thrown in `documentModeRedirectHandler` when checking the authenticated user’s permissions for the opened document. This change handles the exception, allows the filter process to continue.
1 parent eaa310b commit 861778a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

documents-services/src/main/java/org/exoplatform/documents/filter/DocumentModeRedirectHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
4040
String documentPreviewId = httpServletRequest.getParameter("documentPreviewId");
4141
String documentEditId = httpServletRequest.getParameter("docId");
4242
String viewer = httpServletRequest.getRemoteUser();
43+
if (viewer == null) {
44+
chain.doFilter(request, response);
45+
}
4346

4447
String documentId = documentPreviewId != null ? documentPreviewId : documentEditId;
4548

0 commit comments

Comments
 (0)