Skip to content

fix(screenshot-capture): use dynamic getState to avoid stale state snapshot#17375

Open
Sahitya0805 wants to merge 1 commit intojitsi:masterfrom
Sahitya0805:fix/screenshot-capture-stale-state
Open

fix(screenshot-capture): use dynamic getState to avoid stale state snapshot#17375
Sahitya0805 wants to merge 1 commit intojitsi:masterfrom
Sahitya0805:fix/screenshot-capture-stale-state

Conversation

@Sahitya0805
Copy link
Copy Markdown

Description

The ScreenshotCaptureSummary class was storing a snapshot of the Redux state in its constructor. This led to "metadata leakage" when a user switched conferences or when JWTs rotated, as the class continued to use the old state for subsequent screenshots.

This PR refactors the class to store a reference to the getState function instead, ensuring that every time a screenshot is processed, it retrieves the most current data from the store.

Fixes #17247

Checklist

  • The title of the pull request follows the Conventional Commits specification.
  • The description of the pull request is detailed and explains the "why" behind the changes.

@jitsi-jenkins
Copy link
Copy Markdown

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: ScreenshotCaptureSummary uses stale Redux state snapshot, causing cross-conference metadata leakage

2 participants