-
Notifications
You must be signed in to change notification settings - Fork 455
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
Bad string injection of plugin update message #3318
Comments
@justlevine I ran into this and it seemed to be related to this Slevomat cs rule: ed966b6#diff-05ae9cddcaec1e845771a7db224961439f83ef5939ec67d3a48744cb34d7e58bR68 Once I ignored that rule, the const type hints were no longer being added to the UpdateChecker class and the errors I was experiencing went away. |
Hmm. . .that rule doesn't seem to exist in the Github workflow. https://github.com/wp-graphql/wp-graphql/actions/runs/13644419466/job/38140553664?pr=3327#step:5:11 I'm on PHP 8.4 locally. The workflow is PHP 8.2. Perhaps that's the issue? |
I tried to update the workflow to use php 8.4, but it;s still not recognizing that ignore: https://github.com/wp-graphql/wp-graphql/actions/runs/13644528983/job/38140843577?pr=3327#step:5:11 I was able to ignore it locally though 🤔. need to step away, but just noting some findings. |
@jasonbahl I'm happy to take a look locally and update you (Is this related to this UX issue though?) |
@justlevine ah, apologies. I was trying to reproduce and was running into an error which was caused by phpcbf, so in my mind they were related, especially since the issue was on the UpdateChecker.php file, but ya, I don't think it's actually related. I was able to update the composer dependencies and now the ignore rule I added to .phpcs.xml.dist is being respected. And now I can get back to reproducing this 😆 |
@justlevine this is tricky to test 🤔 How do you go about properly simulating an update while not actually updating it? how do we show the update success message but not actually run the update? |
To replicate download an old plugin version (from releases or with the To test (this is what i did last time, might be an easier way 🤷)
Basically, I had an |
Description
The ajax plugin install injects
Updated
at multiple points of our update messageSteps to reproduce
Install WPGraphQL v1.x and a plugin that doesnt explicitly support WPGraphQL 2.x
Click the
update
button to manually update WPGraphQLWait for the update to complete
Additional context
No response
WPGraphQL Version
2.0.0
WordPress Version
6.7.2
PHP Version
8.2.27
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for WPGraphQL.
The text was updated successfully, but these errors were encountered: