-
Notifications
You must be signed in to change notification settings - Fork 851
WAF: Add killswitch define checks #24247
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
Conversation
|
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
singerb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, very thorough PR description! May need some updates for version stuff depending on what merges first.
singerb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good, should merge now assuming checks pass.
Changes proposed in this Pull Request:
actions.phpfile to prevent the package code from runningwp-content/jetpack-waf/bootstrap.phpfile generated byclass-waf-standalone-bootstrap.phpto cover any edge cases where the package had already been set up in standalone mode.Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
actions.phpkillswitch define check:var_dump( ’Testing main killswitch’ ); die();directly after the closing curly brace of the killswitch define check.Testing main killswitchstring is displayed.DISABLE_JETPACK_WAFconstant astrue, either in advance of the check inactions.phpor within yourwp-config.php.bootstrap.phpkillswitch define check:. "var_dump( 'Testing standalone killswitch' ); die();\n”as the initial line for the$codevariable in thegenerate()method inclass-waf-standalone-bootstrap.php.jetpack docker wp jetpack-waf mode normalto set the WAF mode and generate/update the bootstrap file.wp-contents/jetpack-waffolder exists and contains abootstrap.phpfile with the contents of the$codevariable, including the new testing additions..htaccessfile and add the following code to trigger standalone modephp_value auto_prepend_file “/var/www/html/wp-content/jetpack-waf/bootstrap.php”.Testing standalone killswitchstring is displayed.DISABLE_JETPACK_WAFconstant astrue.