vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
619 stars 167 forks source link

fix: delay session expiration handling to prevent canceling ongoing navigation (#19983) (CP: 23.5) #20455

Closed mcollovati closed 4 days ago

mcollovati commented 4 days ago

Attempts to fix the synchronization issue related to the usage of the Login reported in #12640. The Login component sends the UIDL request for the login event to the server and concurrently submits the form. If processing the form submission performs a session ID change and a request redirect, the UIDL requests might fail with a session expiration response. The Flow client then can cancel the first redirect because it reloads the page due to the session expiration. Lastly, the beacon request hits again a valid session, but a resynchronization is triggered because the previous UIDL request was rejected.

This change delays a bit the session expiration handling on Flow client, to allow a potential redirect to complete without being cancelled. However, the client application is immediately set in TERMINATED state.

sonarcloud[bot] commented 4 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

github-actions[bot] commented 4 days ago

Test Results

  963 files  ± 0    963 suites  ±0   53m 15s ⏱️ + 5m 14s 6 310 tests ± 0  6 261 ✅ ± 0  49 💤 ±0  0 ❌ ±0  6 572 runs  +14  6 515 ✅ +12  57 💤 +2  0 ❌ ±0 

Results for commit a1e37fdd. ± Comparison against base commit 584676ef.