@sentry/replay 7.98.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 +19 -5
- package/cjs/index.js.map +1 -1
- package/esm/index.js +19 -5
- package/esm/index.js.map +1 -1
- package/package.json +8 -8
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__
|