Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-9484] Adobe Commerce solving Security Errors #2794

Merged
merged 21 commits into from
Nov 12, 2024
Merged

Conversation

khushboo-singhvi
Copy link
Contributor

@khushboo-singhvi khushboo-singhvi commented Nov 1, 2024

Description

There were few direct uses of $_SERVER Superglobal detected and also few warning related to Magento2.Html.HtmlClosingVoidTags.HtmlClosingVoidElements

Tested scenarios

Fixes

…try to access $_SERVER['PHP_AUTH_USER'], it shows correct mocked value, But when I try to access $this->request->getServer('PHP_AUTH_USER'), it throws null,

This issue likely arises because $_SERVER is populated directly from the server environment variables, but getServer() in Magento might not have access to all the server variables if they’re not set in a way that Magento’s Request class can access.

The only direct solution I found was using $_SERVER directly after setting, since they are available globally in PHP once populated.
Copy link

sonarcloud bot commented Nov 12, 2024

@khushboo-singhvi khushboo-singhvi merged commit e9d13e1 into main Nov 12, 2024
13 of 14 checks passed
@khushboo-singhvi khushboo-singhvi deleted the ECP-9484 branch November 12, 2024 09:11
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.

3 participants