Skip to content

Validate Accept-Language header in HeaderLanguageProvider#5

Merged
alexstandiford merged 1 commit into
mainfrom
fix/validate-accept-language
Jun 11, 2026
Merged

Validate Accept-Language header in HeaderLanguageProvider#5
alexstandiford merged 1 commit into
mainfrom
fix/validate-accept-language

Conversation

@alexstandiford

Copy link
Copy Markdown
Contributor

The provider exploded the raw HTTP_ACCEPT_LANGUAGE header. The primary entry is now validated against the language-tag shape and only the two-letter primary subtag is returned; malformed input resolves to null. Package suite green. Ref phpnomad/wordpress-integration#34 (flagged by Siren's wp.org review simulation).

HeaderLanguageProvider exploded the raw attacker-controlled
HTTP_ACCEPT_LANGUAGE header. Validate the primary entry against the
language-tag shape and return only the two-letter primary subtag;
anything malformed resolves to null.

Ref phpnomad/wordpress-integration#34
@alexstandiford alexstandiford merged commit 73db6b0 into main Jun 11, 2026
0 of 6 checks passed
@alexstandiford alexstandiford deleted the fix/validate-accept-language branch June 11, 2026 14:54
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.

1 participant