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