@zaplier/sdk 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -5981,10 +5981,29 @@ async function collectFingerprint(options = {}) {
5981
5981
  // - Exact hardware values (use buckets)
5982
5982
  // Generate ultra-stable hash with additional collision resistance
5983
5983
  const stableCoreHash = hashStableCore(coreVector, opts.debug);
5984
- // CRITICAL: Generate enhanced fingerprint hash combining unstable + stable components
5985
- // This prevents collisions by adding stable entropy to the fingerprint hash
5984
+ // CRITICAL: Generate enhanced fingerprint hash combining STABLE components only
5985
+ // Filter out unstable components that change between requests (canvas, webgl, audio)
5986
+ // These components can vary due to GPU state, rendering context, permissions, etc.
5987
+ const unstableComponentKeys = [
5988
+ "canvas",
5989
+ "webgl",
5990
+ "audio", // Visual/audio fingerprints (vary with context)
5991
+ "mathFingerprint",
5992
+ "fontPreferences",
5993
+ "enhancedFonts", // Measurement-based (can timeout/vary)
5994
+ "dateTimeLocale",
5995
+ "accessibilityEnhanced", // Locale/accessibility (can change)
5996
+ "domBlockers",
5997
+ "pluginsEnhanced", // Privacy tools detection (can change)
5998
+ ];
5999
+ const stableComponentValues = {};
6000
+ for (const [key, value] of Object.entries(componentValues)) {
6001
+ if (!unstableComponentKeys.includes(key)) {
6002
+ stableComponentValues[key] = value;
6003
+ }
6004
+ }
5986
6005
  const enhancedComponentValues = {
5987
- ...componentValues, // Unstable components (canvas, webgl, audio, etc.)
6006
+ ...stableComponentValues, // STABLE components only (screen, browser, system, etc.)
5988
6007
  _stableCore: coreVector, // + Ultra-stable components (ua, platform, deviceType, etc.)
5989
6008
  // REMOVED: _hourlyEntropy - was causing visitor ID instability (same user = different IDs)
5990
6009
  };