@sentry/replay 7.99.0 → 7.100.0

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/cjs/index.js CHANGED
@@ -508,6 +508,21 @@ function needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass,
508
508
  : node.parentElement;
509
509
  if (el === null)
510
510
  return false;
511
+ if (el.tagName === 'INPUT') {
512
+ const autocomplete = el.getAttribute('autocomplete');
513
+ const disallowedAutocompleteValues = [
514
+ 'current-password',
515
+ 'new-password',
516
+ 'cc-number',
517
+ 'cc-exp',
518
+ 'cc-exp-month',
519
+ 'cc-exp-year',
520
+ 'cc-csc',
521
+ ];
522
+ if (disallowedAutocompleteValues.includes(autocomplete)) {
523
+ return true;
524
+ }
525
+ }
511
526
  let maskDistance = -1;
512
527
  let unmaskDistance = -1;
513
528
  if (maskAllText) {
@@ -739,7 +754,7 @@ function serializeElementNode(n, options) {
739
754
  const len = n.attributes.length;
740
755
  for (let i = 0; i < len; i++) {
741
756
  const attr = n.attributes[i];
742
- if (!ignoreAttribute(tagName, attr.name, attr.value)) {
757
+ if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {
743
758
  attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value, n, maskAttributeFn);
744
759
  }
745
760
  }
@@ -2938,10 +2953,8 @@ function initSelectionObserver(param) {
2938
2953
  }
2939
2954
  function initCustomElementObserver({ doc, customElementCb, }) {
2940
2955
  const win = doc.defaultView;
2941
- if (!win || !win.customElements) {
2942
- return () => {
2943
- };
2944
- }
2956
+ if (!win || !win.customElements)
2957
+ return () => { };
2945
2958
  const restoreHandler = patch(win.customElements, 'define', function (original) {
2946
2959
  return function (name, constructor, options) {
2947
2960
  try {
@@ -3682,6 +3695,7 @@ function record(options = {}) {
3682
3695
  unblockSelector,
3683
3696
  sampling: sampling['canvas'],
3684
3697
  dataURLOptions,
3698
+ errorHandler,
3685
3699
  });
3686
3700
  const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === 'boolean' &&
3687
3701
  __RRWEB_EXCLUDE_SHADOW_DOM__