@checkflow/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
@@ -6639,6 +6639,10 @@ const DEFAULT_CONFIG$1 = {
6639
6639
  maskInputFn: (text, element) => {
6640
6640
  if (!element || !text)
6641
6641
  return text;
6642
+ // Safety check: ensure element is a valid HTMLElement with required methods
6643
+ if (!(element instanceof HTMLElement) || typeof element.tagName !== 'string') {
6644
+ return text;
6645
+ }
6642
6646
  const tagName = element.tagName?.toLowerCase();
6643
6647
  const inputType = element?.type?.toLowerCase();
6644
6648
  // Always mask passwords
@@ -6679,6 +6683,10 @@ const DEFAULT_CONFIG$1 = {
6679
6683
  maskTextFn: (text, element) => {
6680
6684
  if (!element || !text)
6681
6685
  return text;
6686
+ // Safety check: ensure element is a valid HTMLElement
6687
+ if (!(element instanceof HTMLElement) || typeof element.className !== 'string') {
6688
+ return text;
6689
+ }
6682
6690
  // Check if element has sensitive data attributes or classes
6683
6691
  const sensitiveMarkers = ['data-sensitive', 'sensitive', 'private', 'confidential'];
6684
6692
  const elementClasses = element.className?.toLowerCase() || '';