Skip to content

fix: prevent serialization to leak CurrentInstances #21277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

mcollovati
Copy link
Collaborator

@mcollovati mcollovati commented Apr 11, 2025

During serialization and deserialization of VaadinSession and UI,
CurrentInstances may be set but not present in the original instances map,
causing the added instance to leak outside the scope of the deserialization
hook method.
This fix ensures all instances set by the hooks are wiped out before
restoring the original instances.

Copy link

github-actions bot commented Apr 11, 2025

Test Results

1 182 files  ± 0  1 182 suites  ±0   1h 17m 59s ⏱️ + 1m 37s
8 117 tests ± 0  8 060 ✅ ± 0  57 💤 ±0  0 ❌ ±0 
8 487 runs  +23  8 421 ✅ +23  66 💤 ±0  0 ❌ ±0 

Results for commit 343acc2. ± Comparison against base commit 97aa459.

♻️ This comment has been updated with latest results.

@mcollovati mcollovati force-pushed the fix/ui_deserialization_clean_currentinstances branch from 448783e to deae901 Compare April 11, 2025 10:19
During serialization and deserialization of VaadinSession and UI,
CurrentInstances may be set but not present in the original instances map,
causing the added instance to leak outside the scope of the deserialization
hook method.
This fix ensures all instances set by the hooks are wiped out before
restoring the original instances.
@mcollovati mcollovati force-pushed the fix/ui_deserialization_clean_currentinstances branch from deae901 to 343acc2 Compare April 11, 2025 10:20
@mcollovati mcollovati changed the title fix: prevent deserialization to leak CurrentInstances fix: prevent serialization to leak CurrentInstances Apr 11, 2025
@mshabarov mshabarov requested a review from tepi April 14, 2025 11:32
@tepi tepi merged commit 2f50a9c into main Apr 14, 2025
28 of 48 checks passed
@tepi tepi deleted the fix/ui_deserialization_clean_currentinstances branch April 14, 2025 12:54
vaadin-bot pushed a commit that referenced this pull request Apr 14, 2025
During serialization and deserialization of VaadinSession and UI,
CurrentInstances may be set but not present in the original instances map,
causing the added instance to leak outside the scope of the deserialization
hook method.
This fix ensures all instances set by the hooks are wiped out before
restoring the original instances.
vaadin-bot pushed a commit that referenced this pull request Apr 14, 2025
During serialization and deserialization of VaadinSession and UI,
CurrentInstances may be set but not present in the original instances map,
causing the added instance to leak outside the scope of the deserialization
hook method.
This fix ensures all instances set by the hooks are wiped out before
restoring the original instances.
vaadin-bot added a commit that referenced this pull request Apr 14, 2025
During serialization and deserialization of VaadinSession and UI,
CurrentInstances may be set but not present in the original instances map,
causing the added instance to leak outside the scope of the deserialization
hook method.
This fix ensures all instances set by the hooks are wiped out before
restoring the original instances.

Co-authored-by: Marco Collovati <[email protected]>
vaadin-bot added a commit that referenced this pull request Apr 14, 2025
During serialization and deserialization of VaadinSession and UI,
CurrentInstances may be set but not present in the original instances map,
causing the added instance to leak outside the scope of the deserialization
hook method.
This fix ensures all instances set by the hooks are wiped out before
restoring the original instances.

Co-authored-by: Marco Collovati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants