-
Notifications
You must be signed in to change notification settings - Fork 823
Social Image Generator: restrict direct access to token generation #44350
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
base: trunk
Are you sure you want to change the base?
Conversation
Follow-up to #44336 When requesting a token directly from a WordPress.com simple site, we should check for the capability first.
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
@manzoorwanijk @gmjuhasz Do you think you could take a look at this, and let me know if I missed anything obvious in my usage of the Social Image Generator service in #44336, something that would ensure we do not encounter the bug I'm fixing here? Thank you! |
Code Coverage SummaryCoverage changed in 1 file.
|
Follow-up to #44336
Fixes CML-668
Proposed changes:
When requesting a token directly from a WordPress.com simple site, we should check for the capability first.
#44336 uses the Social Image Generator service by calling
\Automattic\Jetpack\Publicize\Social_Image_Generator\fetch_token()
.fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Serfg%2Qncv%2Qcyhtvaf%2Sraqcbvagf%2Swrgcnpx%2Qfbpvny.cuc%3Se%3Qr3s21441%2396-og
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
This is best tested on top of #44336
On a WordPress.com Simple site
og:image
taghttps://s0.wp.com/_si/
URL.We should also ensure that other features relying on Social Image Generator are not impacted.