@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.esm.js CHANGED
@@ -5977,10 +5977,29 @@ async function collectFingerprint(options = {}) {
5977
5977
  // - Exact hardware values (use buckets)
5978
5978
  // Generate ultra-stable hash with additional collision resistance
5979
5979
  const stableCoreHash = hashStableCore(coreVector, opts.debug);
5980
- // CRITICAL: Generate enhanced fingerprint hash combining unstable + stable components
5981
- // This prevents collisions by adding stable entropy to the fingerprint hash
5980
+ // CRITICAL: Generate enhanced fingerprint hash combining STABLE components only
5981
+ // Filter out unstable components that change between requests (canvas, webgl, audio)
5982
+ // These components can vary due to GPU state, rendering context, permissions, etc.
5983
+ const unstableComponentKeys = [
5984
+ "canvas",
5985
+ "webgl",
5986
+ "audio", // Visual/audio fingerprints (vary with context)
5987
+ "mathFingerprint",
5988
+ "fontPreferences",
5989
+ "enhancedFonts", // Measurement-based (can timeout/vary)
5990
+ "dateTimeLocale",
5991
+ "accessibilityEnhanced", // Locale/accessibility (can change)
5992
+ "domBlockers",
5993
+ "pluginsEnhanced", // Privacy tools detection (can change)
5994
+ ];
5995
+ const stableComponentValues = {};
5996
+ for (const [key, value] of Object.entries(componentValues)) {
5997
+ if (!unstableComponentKeys.includes(key)) {
5998
+ stableComponentValues[key] = value;
5999
+ }
6000
+ }
5982
6001
  const enhancedComponentValues = {
5983
- ...componentValues, // Unstable components (canvas, webgl, audio, etc.)
6002
+ ...stableComponentValues, // STABLE components only (screen, browser, system, etc.)
5984
6003
  _stableCore: coreVector, // + Ultra-stable components (ua, platform, deviceType, etc.)
5985
6004
  // REMOVED: _hourlyEntropy - was causing visitor ID instability (same user = different IDs)
5986
6005
  };