WildMeOrg / Wildbook

Wild Me's first product, Wildbook supports researchers by allowing collaboration across the globe and automation of photo ID matching
https://www.wildme.org/wildbook.html
GNU General Public License v2.0
106 stars 71 forks source link

JSP/JavaScript Modal Timeout Inaccurately Uses Timer Rather than Session Check #863

Open JasonWildMe opened 1 week ago

JasonWildMe commented 1 week ago

Expected Behavior The timeout model popup (JSP/Javascript version) should only warn users of an upcoming/past Session timeout by checking the actual server-side Session timer, which can be affected by any user request, esepcially those coming from multi-tab browsing by the user.

Current Behavior The current JSP/Javascript model uses a simple countdown timer, which means any session extension coming from a different tab is ignored. In multi-tab use of Wildbook, this means that multiple tabs can run through the timer and incorrectly report a session timeout (forcing a lot of user clicking to clear) while the session is still quite active. Using a timer also forces the use of an unncessary configuration value of commonConfiguration.properties of sessionCountdownTime. This can be removed as it has no real effect on the actual remaining session time or the actual value defined in web.xml.

Testing Notes Easiest way to test is to keep one tab active with user requests while other tabs remainin inactive. The goal is to ensure those other tabs never display a session timeout warning unless the actual server-side Session is approaching timeout or has timed out.

erinz2020 commented 1 week ago

React needs to use server-side session timer too.