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

Remove vendor files that prints php information phpinfo() #2673

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

ianlin
Copy link
Member

@ianlin ianlin commented Nov 13, 2024

Changes proposed in this Pull Request:

SIRT: p3btAN-2W0-p2

This PR removes a Google Ads API file vendor/googleads/google-ads-php/scripts/print_php_information.php that prints the php information using phpinfo().

There is already a script bin/cleanup-vendor-files.sh that removes the unneeded vendor files, adding one more removal there.

The file wasn't used anywhere in the code, so it's safe to remove it after composer install.

I also checked other files under vendor/ folder and confirmed no one is also calling phpinfo().

What does vendor/googleads/google-ads-php/scripts/print_php_information.php do?

It's mainly used in googleads/google-ads-php repo when anyone creates a bug report issue, they recommend the issue opener attaches the output of that script.

Ref: googleads/google-ads-php#466

Detailed test instructions:

How to reproduce it

  1. Build the plugin using develop branch by running nvm use && npm i && composer install && npm run build
  2. Install the google-listing-and-ads.zip that just being built in your site
  3. Go to https://<your-site>/wp-content/plugins/google-listings-and-ads/vendor/googleads/google-ads-php/scripts/print_php_information.php, replace <your-site> with your site's URL.
  4. You should see the php information page

How to test it

  1. Build the plugin using this branch by running nvm use && npm i && composer install && npm run build
  2. Install the google-listing-and-ads.zip that just being built in your site
  3. Go to https://<your-site>/wp-content/plugins/google-listings-and-ads/vendor/googleads/google-ads-php/scripts/print_php_information.php, replace <your-site> with your site's URL
  4. You should see 404 page not found
  5. Make sure the functionality of the plugin works as expected

Additional details:

Changelog entry

Fix - Remove a Google Ads API vendor file that prints php information

@ianlin ianlin added the sirt label Nov 13, 2024
@ianlin ianlin requested a review from a team November 13, 2024 04:25
@ianlin ianlin self-assigned this Nov 13, 2024
@github-actions github-actions bot added type: bug The issue is a confirmed bug. changelog: fix Took care of something that wasn't working. labels Nov 13, 2024
Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Tested locally and it can fix the issue. LGTM.

@ianlin ianlin merged commit 41f221f into develop Nov 13, 2024
4 checks passed
@ianlin ianlin deleted the fix/google-ads-api-prints-php-info branch November 13, 2024 04:55
@eason9487 eason9487 mentioned this pull request Nov 14, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Took care of something that wasn't working. sirt type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants