@screeb/rrweb 1.0.5 → 1.0.6

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/rrweb.js CHANGED
@@ -635,6 +635,21 @@ function needMaskingText(node2, maskTextClass, maskTextSelector, checkAncestors)
635
635
  el = index$1.parentElement(node2);
636
636
  }
637
637
  try {
638
+ if (el.tagName === "INPUT") {
639
+ const autocomplete = el.getAttribute("autocomplete");
640
+ const disallowedAutocompleteValues = [
641
+ "current-password",
642
+ "new-password",
643
+ "cc-number",
644
+ "cc-exp",
645
+ "cc-exp-month",
646
+ "cc-exp-year",
647
+ "cc-csc"
648
+ ];
649
+ if (disallowedAutocompleteValues.includes(autocomplete)) {
650
+ return true;
651
+ }
652
+ }
638
653
  if (typeof maskTextClass === "string") {
639
654
  if (checkAncestors) {
640
655
  if (el.closest(`.${maskTextClass}`)) return true;