Skip to content

Added Client.snapshotVersion(), replaced snapshot() for security matters#204

Merged
petruki merged 1 commit intomasterfrom
staging-2
Jul 1, 2025
Merged

Added Client.snapshotVersion(), replaced snapshot() for security matters#204
petruki merged 1 commit intomasterfrom
staging-2

Conversation

@petruki
Copy link
Member

@petruki petruki commented Jul 1, 2025

Enhancements to snapshot handling:

  • src/client.js: Added a new static method snapshotVersion to the Client class to retrieve the snapshot version from GlobalSnapshot. This method returns the version or defaults to 0 if no snapshot data is available.
    This API replaces the old Client.snapshot(), which could leak sensitive data from Strategy values. The snapshot version can be used to log or validate latest changes in runtime.

@petruki petruki added this to the v4.4.0 milestone Jul 1, 2025
@petruki petruki self-assigned this Jul 1, 2025
@petruki petruki added the enhancement New feature or request label Jul 1, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 1, 2025

@petruki petruki merged commit 52a94c9 into master Jul 1, 2025
11 checks passed
@petruki petruki deleted the staging-2 branch July 1, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant