Skip to content

fix: applies isEnabled condition to parse_ini_file function call#48

Merged
asadali214 merged 2 commits intomasterfrom
47-parse-ini-file-method-disabled
Mar 15, 2024
Merged

fix: applies isEnabled condition to parse_ini_file function call#48
asadali214 merged 2 commits intomasterfrom
47-parse-ini-file-method-disabled

Conversation

@asadali214
Copy link
Copy Markdown
Collaborator

What

This PR adds a condition to calling parse_ini_file(), by checking if it doesn't exist in the disabled functions list

Why

The disable_functions list in php.ini might contain parse_ini_file function call, as it parses the .ini file which tends to contain sensitive information apart from the required configuration.

Closes #47

Type of change

Select multiple if applicable.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Dependency Change

N/A

Breaking change

This PR does not introduce any breaking changes

Testing

I have tested this change by adding parse_ini_file to the disable_functions option in php.ini file

Checklist

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

@asadali214 asadali214 self-assigned this Mar 14, 2024
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@asadali214 asadali214 merged commit 5fe6ee7 into master Mar 15, 2024
@asadali214 asadali214 deleted the 47-parse-ini-file-method-disabled branch March 15, 2024 06:02
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.

If the parse_ini_file() method is in the disabled_function list in php.ini

2 participants