Skip to content

fix(security): remove obsolete X-XSS-Protection header support#1309

Merged
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/xss_removal
Apr 5, 2026
Merged

fix(security): remove obsolete X-XSS-Protection header support#1309
JohnVillalovos merged 1 commit intodevelopfrom
jlvillal/xss_removal

Conversation

@JohnVillalovos
Copy link
Copy Markdown
Collaborator

Remove the security.x-xss config key and X-XSS-Protection header. This header is obsolete — the XSS Auditor it controlled has been removed from all modern browsers, and in some cases it could be exploited to introduce vulnerabilities.

The key is registered in DeprecatedConfigKeys so existing config files produce a helpful deprecation message instead of an unknown key warning.

Remove the security.x-xss config key and X-XSS-Protection header.
This header is obsolete — the XSS Auditor it controlled has been
removed from all modern browsers, and in some cases it could be
exploited to introduce vulnerabilities.

The key is registered in DeprecatedConfigKeys so existing config
files produce a helpful deprecation message instead of an unknown
key warning.
Copilot AI review requested due to automatic review settings April 5, 2026 02:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes support for the obsolete X-XSS-Protection security header and its associated configuration key, while preserving a clear deprecation path so existing config files emit a helpful “removed key” message instead of “unknown key”.

Changes:

  • Stop sending the X-XSS-Protection header from the main page response.
  • Remove the security.x-xss config key from the config schema, docs, and config templates.
  • Register security.x-xss (and its legacy form) in DeprecatedConfigKeys, and add unit tests for deprecation lookups.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Infrastructure/Config/DeprecatedConfigKeysTest.php Adds coverage for deprecated-key reason lookups and key normalization invariants
Pages/Page.php Removes the X-XSS-Protection header emission
lib/Config/DeprecatedConfigKeys.php Registers removed security.x-xss keys so config validation logs a deprecation message
lib/Config/ConfigKeys.php Removes the SECURITY_X_XSS config definition from the schema
docs/source/ADVANCED-CONFIGURATION.rst Deletes documentation for the removed security setting
config/config.dist.php Removes the x-xss default from the distributed config template
.env.example Removes the obsolete env var example for LB_SECURITY_X_XSS

Comment thread tests/Infrastructure/Config/DeprecatedConfigKeysTest.php
Comment thread tests/Infrastructure/Config/DeprecatedConfigKeysTest.php
Comment thread lib/Config/DeprecatedConfigKeys.php
Comment thread lib/Config/DeprecatedConfigKeys.php
@JohnVillalovos JohnVillalovos merged commit f594942 into develop Apr 5, 2026
20 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/xss_removal branch April 5, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants