@contrast/agent 4.36.1 → 4.36.2
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.
|
@@ -12,6 +12,8 @@ Copyright: 2023 Contrast Security, Inc
|
|
|
12
12
|
engineered, modified, repackaged, sold, redistributed or otherwise used in a
|
|
13
13
|
way not consistent with the End User License Agreement.
|
|
14
14
|
*/
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
15
17
|
const agentEmitter = require('../../../agent-emitter');
|
|
16
18
|
|
|
17
19
|
const RULE_ID = 'xxssprotection-header-disabled';
|
|
@@ -23,14 +25,11 @@ module.exports = ({ common }) => {
|
|
|
23
25
|
rule.check = function check(responseHeaders) {
|
|
24
26
|
const header = responseHeaders[HEADER_NAME];
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
if (header && !header.startsWith('1')) {
|
|
29
|
+
return {
|
|
30
|
+
data: header
|
|
31
|
+
};
|
|
29
32
|
}
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
data: header
|
|
33
|
-
};
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
rule.handle = function handle() {
|