Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
6.2.27
-
None
-
Custom code:
Implemented security improvement - close magnolia admincentral session when user closes browser tab.
- add java script function "uiUnload" to current UI page: invalidate magnolia session
- register uiUnload function for events "beforeunload" and "unload" at UI page javaScript
-- UI.getCurrent().getPage().getJavaScript().execute("window.addEventListener('unload', " + FN_UI_UNLOADED + ");");Custom code: Implemented security improvement - close magnolia admincentral session when user closes browser tab. - add java script function "uiUnload" to current UI page: invalidate magnolia session - register uiUnload function for events "beforeunload" and "unload" at UI page javaScript -- UI.getCurrent().getPage().getJavaScript().execute("window.addEventListener('unload', " + FN_UI_UNLOADED + ");");
Description
Steps to reproduce
- register java script function for page window event "unload"
- download some content from admincentral (asset, translations, yaml/xml from jcr browser...)
.. Logs, screenshots, gifs...
Expected results
- the java-script function registered for the unload event is NOT called
- downloading some content (file) should not trigger the same java-script page events as closing the browser tab
Actual results
- the java-script function registered for the unload event IS called
- Within the java-script function I cannot distinguish between a download and closing the browser tab
Workaround
- setting a marker session attribute when executing an export command and do not execute "unload"-function if present
- not a got idea because this meeas to overwrite several commands in several modules
Development notes
For our use case (invalidate magnolia session when closing the browser or it's tab) this has the effect that the user get's logged out when exporting some content.
Any suggestions for an alternative implementation?
Checklists
Acceptance criteria