@pendo/agent 2.301.1 → 2.302.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/dist/dom.esm.js +1 -1
- package/dist/pendo.module.js +26 -12
- 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.0_';
|
|
3908
|
+
let PACKAGE_VERSION = '2.302.0';
|
|
3909
3909
|
let LOADER = 'xhr';
|
|
3910
3910
|
/* eslint-enable agent-eslint-rules/no-gulp-env-references */
|
|
3911
3911
|
/**
|
|
@@ -18109,6 +18109,11 @@ function throwIllegalKeyError(key, guideId, stepId, type) {
|
|
|
18109
18109
|
log.info(error);
|
|
18110
18110
|
throw new Error(error);
|
|
18111
18111
|
}
|
|
18112
|
+
function throwIllegalValueforKeyError(value, key, guideId, stepId) {
|
|
18113
|
+
var error = 'illegal value "' + value + '" for building block key "' + key + '" found on guide "' + guideId + '" step "' + stepId + '"';
|
|
18114
|
+
log.info(error);
|
|
18115
|
+
throw new Error(error);
|
|
18116
|
+
}
|
|
18112
18117
|
// whitelist + aria-* and data-* props to ensure we won't append props that could execute js
|
|
18113
18118
|
function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
18114
18119
|
var whitelistMap = {
|
|
@@ -18122,6 +18127,7 @@ function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
|
18122
18127
|
'class': true,
|
|
18123
18128
|
'cols': true,
|
|
18124
18129
|
'contenteditable': true,
|
|
18130
|
+
'referrerpolicy': true,
|
|
18125
18131
|
'dir': true,
|
|
18126
18132
|
'for': true,
|
|
18127
18133
|
'frameborder': true,
|
|
@@ -18144,6 +18150,9 @@ function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
|
18144
18150
|
'type': true,
|
|
18145
18151
|
'value': true
|
|
18146
18152
|
};
|
|
18153
|
+
let allowedValuesForAttributes = {
|
|
18154
|
+
referrerpolicy: ['strict-origin', 'strict-origin-when-cross-origin']
|
|
18155
|
+
};
|
|
18147
18156
|
var restrictedNodes = {
|
|
18148
18157
|
embed: { src: true }
|
|
18149
18158
|
};
|
|
@@ -18158,6 +18167,11 @@ function getAllowedAttributes(attributeKeyValueMap, stepId, guideId, type) {
|
|
|
18158
18167
|
if (!whitelistMap[key] && !isDataAttrRegex.test(key) && !isAriaAttrRegex.test(key)) {
|
|
18159
18168
|
throwIllegalKeyError(key, guideId, stepId);
|
|
18160
18169
|
}
|
|
18170
|
+
let keyValue = attributeKeyValueMap[key];
|
|
18171
|
+
let allowedValues = allowedValuesForAttributes[key];
|
|
18172
|
+
if (allowedValues && !_.contains(allowedValues, keyValue)) {
|
|
18173
|
+
throwIllegalValueforKeyError(keyValue, key, guideId, stepId);
|
|
18174
|
+
}
|
|
18161
18175
|
allowed[key] = attributeKeyValueMap[key];
|
|
18162
18176
|
return allowed;
|
|
18163
18177
|
}, {});
|
|
@@ -25417,11 +25431,6 @@ function getDefaultSeenReason(guide) {
|
|
|
25417
25431
|
}
|
|
25418
25432
|
var seenGuide = function (guideId, stepId, visitorId, reason, language, props) {
|
|
25419
25433
|
if (!reason) {
|
|
25420
|
-
log.critical('pendo.io guideSeen exception', {
|
|
25421
|
-
guideId,
|
|
25422
|
-
stepId,
|
|
25423
|
-
error: new Error('seenGuide called without seen reason')
|
|
25424
|
-
});
|
|
25425
25434
|
reason = getDefaultSeenReason(findGuideById(guideId));
|
|
25426
25435
|
}
|
|
25427
25436
|
var evt = createGuideEvent({
|
|
@@ -37859,11 +37868,16 @@ const FrustrationEvent = (function () {
|
|
|
37859
37868
|
if (pendoGlobal.sniffer.MutationObserver) {
|
|
37860
37869
|
const MutationObserver = getZoneSafeMethod('MutationObserver');
|
|
37861
37870
|
mutationObserver = new MutationObserver(observeDOMMutation);
|
|
37862
|
-
|
|
37863
|
-
|
|
37864
|
-
|
|
37865
|
-
|
|
37866
|
-
|
|
37871
|
+
try {
|
|
37872
|
+
mutationObserver.observe(pendoGlobal.dom.getBody(), {
|
|
37873
|
+
childList: true,
|
|
37874
|
+
attributes: true,
|
|
37875
|
+
subtree: true
|
|
37876
|
+
});
|
|
37877
|
+
}
|
|
37878
|
+
catch (e) {
|
|
37879
|
+
mutationObserver = null;
|
|
37880
|
+
}
|
|
37867
37881
|
}
|
|
37868
37882
|
}
|
|
37869
37883
|
function teardown() {
|