@pendo/agent 2.301.3 → 2.302.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/dist/dom.esm.js +1 -1
- package/dist/pendo.module.js +29 -14
- package/dist/pendo.module.min.js +4 -4
- package/dist/servers.json +7 -7
- package/package.json +1 -1
package/dist/dom.esm.js
CHANGED
package/dist/pendo.module.js
CHANGED
|
@@ -3904,8 +3904,8 @@ let SERVER = '';
|
|
|
3904
3904
|
let ASSET_HOST = '';
|
|
3905
3905
|
let ASSET_PATH = '';
|
|
3906
3906
|
let DESIGNER_SERVER = '';
|
|
3907
|
-
let VERSION = '2.
|
|
3908
|
-
let PACKAGE_VERSION = '2.
|
|
3907
|
+
let VERSION = '2.302.1_';
|
|
3908
|
+
let PACKAGE_VERSION = '2.302.1';
|
|
3909
3909
|
let LOADER = 'xhr';
|
|
3910
3910
|
/* eslint-enable agent-eslint-rules/no-gulp-env-references */
|
|
3911
3911
|
/**
|
|
@@ -18113,6 +18113,11 @@ function throwIllegalKeyError(key, guideId, stepId, type) {
|
|
|
18113
18113
|
log.info(error);
|
|
18114
18114
|
throw new Error(error);
|
|
18115
18115
|
}
|
|
18116
|
+
function throwIllegalValueforKeyError(value, key, guideId, stepId) {
|
|
18117
|
+
var error = 'illegal value "' + value + '" for building block key "' + key + '" found on guide "' + guideId + '" step "' + stepId + '"';
|
|
18118
|
+
log.info(error);
|
|
18119
|
+
throw new Error(error);
|
|
18120
|
+
}
|
|
18116
18121
|
// whitelist + aria-* and data-* props to ensure we won't append props that could execute js
|
|
18117
18122
|
function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
18118
18123
|
var whitelistMap = {
|
|
@@ -18126,6 +18131,7 @@ function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
|
18126
18131
|
'class': true,
|
|
18127
18132
|
'cols': true,
|
|
18128
18133
|
'contenteditable': true,
|
|
18134
|
+
'referrerpolicy': true,
|
|
18129
18135
|
'dir': true,
|
|
18130
18136
|
'for': true,
|
|
18131
18137
|
'frameborder': true,
|
|
@@ -18148,6 +18154,9 @@ function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
|
18148
18154
|
'type': true,
|
|
18149
18155
|
'value': true
|
|
18150
18156
|
};
|
|
18157
|
+
let allowedValuesForAttributes = {
|
|
18158
|
+
referrerpolicy: ['strict-origin', 'strict-origin-when-cross-origin']
|
|
18159
|
+
};
|
|
18151
18160
|
var restrictedNodes = {
|
|
18152
18161
|
embed: { src: true }
|
|
18153
18162
|
};
|
|
@@ -18162,6 +18171,11 @@ function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
|
18162
18171
|
if (!whitelistMap[key] && !isDataAttrRegex.test(key) && !isAriaAttrRegex.test(key)) {
|
|
18163
18172
|
throwIllegalKeyError(key, guideId, stepId);
|
|
18164
18173
|
}
|
|
18174
|
+
let keyValue = attributeKeyValueMap[key];
|
|
18175
|
+
let allowedValues = allowedValuesForAttributes[key];
|
|
18176
|
+
if (allowedValues && !_.contains(allowedValues, keyValue)) {
|
|
18177
|
+
throwIllegalValueforKeyError(keyValue, key, guideId, stepId);
|
|
18178
|
+
}
|
|
18165
18179
|
allowed[key] = attributeKeyValueMap[key];
|
|
18166
18180
|
return allowed;
|
|
18167
18181
|
}, {});
|
|
@@ -25421,11 +25435,6 @@ function getDefaultSeenReason(guide) {
|
|
|
25421
25435
|
}
|
|
25422
25436
|
var seenGuide = function (guideId, stepId, visitorId, reason, language, props) {
|
|
25423
25437
|
if (!reason) {
|
|
25424
|
-
log.critical('pendo.io guideSeen exception', {
|
|
25425
|
-
guideId,
|
|
25426
|
-
stepId,
|
|
25427
|
-
error: new Error('seenGuide called without seen reason')
|
|
25428
|
-
});
|
|
25429
25438
|
reason = getDefaultSeenReason(findGuideById(guideId));
|
|
25430
25439
|
}
|
|
25431
25440
|
var evt = createGuideEvent({
|
|
@@ -26790,8 +26799,9 @@ class NetworkRequestIntercept {
|
|
|
26790
26799
|
window.fetch = function (...args) {
|
|
26791
26800
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26792
26801
|
let [url, config = {}] = args;
|
|
26793
|
-
|
|
26794
|
-
if (
|
|
26802
|
+
let isRequestObject = false;
|
|
26803
|
+
if (_.isObject(args[0])) {
|
|
26804
|
+
isRequestObject = true;
|
|
26795
26805
|
url = args[0].url;
|
|
26796
26806
|
// Clone the Request object to avoid consuming the body
|
|
26797
26807
|
config = args[0].clone();
|
|
@@ -37862,11 +37872,16 @@ const FrustrationEvent = (function () {
|
|
|
37862
37872
|
if (pendoGlobal.sniffer.MutationObserver) {
|
|
37863
37873
|
const MutationObserver = getZoneSafeMethod('MutationObserver');
|
|
37864
37874
|
mutationObserver = new MutationObserver(observeDOMMutation);
|
|
37865
|
-
|
|
37866
|
-
|
|
37867
|
-
|
|
37868
|
-
|
|
37869
|
-
|
|
37875
|
+
try {
|
|
37876
|
+
mutationObserver.observe(pendoGlobal.dom.getBody(), {
|
|
37877
|
+
childList: true,
|
|
37878
|
+
attributes: true,
|
|
37879
|
+
subtree: true
|
|
37880
|
+
});
|
|
37881
|
+
}
|
|
37882
|
+
catch (e) {
|
|
37883
|
+
mutationObserver = null;
|
|
37884
|
+
}
|
|
37870
37885
|
}
|
|
37871
37886
|
}
|
|
37872
37887
|
function teardown() {
|