@sentry/replay 7.99.0 → 7.100.1

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/esm/index.js CHANGED
@@ -502,6 +502,21 @@ function needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass,
502
502
  : node.parentElement;
503
503
  if (el === null)
504
504
  return false;
505
+ if (el.tagName === 'INPUT') {
506
+ const autocomplete = el.getAttribute('autocomplete');
507
+ const disallowedAutocompleteValues = [
508
+ 'current-password',
509
+ 'new-password',
510
+ 'cc-number',
511
+ 'cc-exp',
512
+ 'cc-exp-month',
513
+ 'cc-exp-year',
514
+ 'cc-csc',
515
+ ];
516
+ if (disallowedAutocompleteValues.includes(autocomplete)) {
517
+ return true;
518
+ }
519
+ }
505
520
  let maskDistance = -1;
506
521
  let unmaskDistance = -1;
507
522
  if (maskAllText) {
@@ -733,7 +748,7 @@ function serializeElementNode(n, options) {
733
748
  const len = n.attributes.length;
734
749
  for (let i = 0; i < len; i++) {
735
750
  const attr = n.attributes[i];
736
- if (!ignoreAttribute(tagName, attr.name, attr.value)) {
751
+ if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {
737
752
  attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value, n, maskAttributeFn);
738
753
  }
739
754
  }
@@ -2932,10 +2947,8 @@ function initSelectionObserver(param) {
2932
2947
  }
2933
2948
  function initCustomElementObserver({ doc, customElementCb, }) {
2934
2949
  const win = doc.defaultView;
2935
- if (!win || !win.customElements) {
2936
- return () => {
2937
- };
2938
- }
2950
+ if (!win || !win.customElements)
2951
+ return () => { };
2939
2952
  const restoreHandler = patch(win.customElements, 'define', function (original) {
2940
2953
  return function (name, constructor, options) {
2941
2954
  try {
@@ -3676,6 +3689,7 @@ function record(options = {}) {
3676
3689
  unblockSelector,
3677
3690
  sampling: sampling['canvas'],
3678
3691
  dataURLOptions,
3692
+ errorHandler,
3679
3693
  });
3680
3694
  const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === 'boolean' &&
3681
3695
  __RRWEB_EXCLUDE_SHADOW_DOM__
@@ -5849,16 +5863,17 @@ function addFeedbackBreadcrumb(replay, event) {
5849
5863
  type: EventType.Custom,
5850
5864
  timestamp: event.timestamp * 1000,
5851
5865
  data: {
5852
- timestamp: event.timestamp,
5853
5866
  tag: 'breadcrumb',
5854
5867
  payload: {
5868
+ timestamp: event.timestamp,
5869
+ type: 'default',
5855
5870
  category: 'sentry.feedback',
5856
5871
  data: {
5857
5872
  feedbackId: event.event_id,
5858
5873
  },
5859
5874
  },
5860
5875
  },
5861
- });
5876
+ } );
5862
5877
 
5863
5878
  return false;
5864
5879
  });