Mike Carter
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Mail Logging] Email ProtectedHi @darshanaw,
Thanks for clearing that up! Yes, I do use Cloudflare and never enabled the Email Obfuscation feature, but they are always implementing new features without telling us or changing the interface for their dashboard. Thanks for the detailed notes. I will try the second option to see if it’s possible to only obfuscate emails on the public side.
Mike
Thanks for looking into it. Yes, I already tried reviewing Security Events in Cloudflare for xmlrpc.php, but couldn’t find any. I did quite a bit of debugging prior to contacting support.
Yes, it’s possible one of the Cloudflare security challenges could be causing an issue, but the error response does appear (I’ve actually tested this) to originate from my own web server, not from the edge network/firewall, and it’s a 405 response, not a 403. Is it possible that WordPress.com/Jetpack is sending a bad request, and that I may need to reconnect to the Jetpack service again?
Also, do you know if this alternate_xmlrpc() method is compatible with WordPress?
Here is the original post, so it’s easier for you to investigate the code and see exactly which line in IXR_Server is triggering the error response:
I narrowed it down to the version of Jetpack 9.1.2 that is included with Woo Tax. In my case, xmlrpc.php is not being blocked and Automattic’s APN and IP’s are both whitelisted. The trouble seems to be that WordPress.com is making a GET request to my server that triggers a method called alternate_xmlrpc(). I have narrowed it down to these lines in Jetpack’s class-manager.php (lines 263:278):
// Alternate XML-RPC, via ?for=jetpack&jetpack=comms.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- This just determines whether to handle the request as an XML-RPC request. The actual XML-RPC endpoints do the appropriate nonce checking where applicable. Plus we make sure to clear all cookies via require_jetpack_authentication called later in method.
if ( isset( $_GET['jetpack'] ) && 'comms' === $_GET['jetpack'] ) {
if ( ! Constants::is_defined( 'XMLRPC_REQUEST' ) ) {
// Use the real constant he// Alternate XML-RPC, via ?for=jetpack&jetpack=comms.re for WordPress' sake.
define( 'XMLRPC_REQUEST', true );
}
add_action( 'template_redirect', array( $this, 'alternate_xmlrpc' ) );
add_filter( 'xmlrpc_methods', array( $this, 'remove_non_jetpack_xmlrpc_methods' ), 1000 );
}
if ( ! Constants::get_constant( 'XMLRPC_REQUEST' ) ) {
return false;
}The resulting handler in the WordPress IXR library rejects the request with a 405 response, because it is expecting a POST instead. It sounds like this code was added as a workaround for servers who block xmlrpc.php, but it doesn’t appear to be functioning correctly. Woo Tax is working fine, and it is able to access the API for receiving tax data without problems. The warning seems to be a false alert. Here are the lines in IXR_Server that trigger the error (lines 39:59):
function serve($data = false)
{
if (!$data) {
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
if ( function_exists( 'status_header' ) ) {
status_header( 405 ); // WP #20986
header( 'Allow: POST' );
}
header('Content-Type: text/plain'); // merged from WP #9093
die('XML-RPC server accepts POST requests only.');
}
$data = file_get_contents('php://input');
}
$this->message = new IXR_Message($data);
if (!$this->message->parse()) {
$this->error(-32700, 'parse error. not well formed');
}
if ($this->message->messageType != 'methodCall') {
$this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall');
}
$result = $this->call($this->message->methodName, $this->message->params);I’m testing with WordPress 7.1.1 and Woo Tax 3.6.16
Have your engineers tested Woo Tax with WordPress 7.1.x and does the request GET request from WordPress.com ?for=jetpack&jetpack=comms actually return a successful 200 response?
Any update on this? Were you able to view the status report?
Here is the status report:
Connection Error Warning (Displayed in Site Health):
A healthy Jetpack Connection allows connected plugins (such as Jetpack and WooCommerce) to provide features like Stats, Site Security, and Payments.
Error WordPress.com reached your site but the request was blocked (HTTP 405). This is usually caused by a firewall, security plugin, or server rule rejecting requests from WordPress.com.
Ask your host or security provider to allow requests from WordPress.com to your site’s xmlrpc.php file. Reconnecting will not resolve this. If you need further help, contact Jetpack support.
Hi Shazeen,
Thanks for the workaround. I can definitely add that filter to functions.php in the meantime.
Small correction: IXR_Server returns a 405 Not Allowed response, not a 403.
I’m unsure of the last time the jetpack connection health check produced a positive result, but I do know that xmlrpc.php is unblocked. I’ve tested this by observing my web server logs. Automattic’s APN and IP’s have both been whitelisted in Cloudflare’s WAF, and I can see the Jetpack request being handled by Apache and PHP FPM directly. The 405 response is definitely coming from IXR_Server in the corresponding WordPess library and not from Cloudflare.
Do you have systems where this test is running correctly and xmlrpc.php is unblocked?
Thanks,
Mike- This reply was modified 1 week, 5 days ago by Mike Carter.
Forum: Plugins
In reply to: [Customer Reviews for WooCommerce] WordPress 7.1.1 CompatibilityHi Pear,
Sorry for the delay. I had to wait for the off hours to be able to test on the live site. Here are the results for the customer review form:
WordPress 7.1.2 – image upload works okay, but form submit to admin-ajax.php returns a 403 response
WordPress 7.1 – image upload and form submit both workIs there a way to share an image without a url? I don’t see an option to upload an image directly here.
It looks like I will have to uninstall the plugin since it’s not compatible with the current version of WordPress. I like to keep WordPress updated, and most of my plugins are auto-updated.
It seems like this topic should not have been marked as resolved yet.
Thanks,
Mike
- This reply was modified 1 week, 5 days ago by Mike Carter.
- This reply was modified 1 week, 5 days ago by Mike Carter.
Forum: Plugins
In reply to: [WooCommerce] Jetpack Connection Health Check WarningThanks Gabriel, I’m still receiving the same warning with WooCommerce Tax 3.7.0 installed. I have posted a link to the same topic in the WooCommerce Services forum to see if anyone has any ideas. I don’t think the warning is affecting any functionality, it’s mostly an annoyance.
- This reply was modified 2 weeks ago by Mike Carter.
Forum: Plugins
In reply to: [Customer Reviews for WooCommerce] WordPress 7.1.1 CompatibilityNo, I meant I clicked on the link in the review reminder email, but because I had previously left a review, it shows an edit button instead.
I will send out a new email reminder and test it again this evening.
Forum: Plugins
In reply to: [Customer Reviews for WooCommerce] WordPress 7.1.1 CompatibilityHi Pear,
Thanks for the quick reply. Yes, it seems to be working with WordPress version 7.1.2. Because I already posted a test review to my website, I used the edit review link. Is that basically the same thing?
Mike
Hi,
I’m also encountering the same issue with the Woo Tax plugin and see the following warning:
WordPress.com requests to your site are being blocked, usually by a firewall or security rule. See Site Health for details and next steps. Visit Site Health
I narrowed it down to the same version of Jetpack 9.1.2. In my case, xmlrpc.php is not being blocked and Automattic’s APN and IP’s are both whitelisted. The trouble seems to be that WordPress.com is making a GET request to my server that triggers a method called alternate_xmlrpc(). I have narrowed it down to these lines in Jetpack’s class-manager.php:
// Alternate XML-RPC, via ?for=jetpack&jetpack=comms.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- This just determines whether to handle the request as an XML-RPC request. The actual XML-RPC endpoints do the appropriate nonce checking where applicable. Plus we make sure to clear all cookies via require_jetpack_authentication called later in method.
if ( isset( $_GET['jetpack'] ) && 'comms' === $_GET['jetpack'] ) {
if ( ! Constants::is_defined( 'XMLRPC_REQUEST' ) ) {
// Use the real constant here for WordPress' sake.
define( 'XMLRPC_REQUEST', true );
}
add_action( 'template_redirect', array( $this, 'alternate_xmlrpc' ) );
add_filter( 'xmlrpc_methods', array( $this, 'remove_non_jetpack_xmlrpc_methods' ), 1000 );
}
if ( ! Constants::get_constant( 'XMLRPC_REQUEST' ) ) {
return false;
}The resulting handler in the WordPress IXR library rejects the request with a 405 response, because it is expecting a POST instead. It sounds like this code was added as a workaround for servers who block xmlrpc.php, but it doesn’t appear to be functioning correctly. Woo Tax is working fine, and it is able to access the API for receiving tax data without problems. The warning seems to be a false alert. Here are the lines in IXR_Server that trigger the error:
function serve($data = false)
{
if (!$data) {
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] !== 'POST') {
if ( function_exists( 'status_header' ) ) {
status_header( 405 ); // WP #20986
header( 'Allow: POST' );
}
header('Content-Type: text/plain'); // merged from WP #9093
die('XML-RPC server accepts POST requests only.');
}
$data = file_get_contents('php://input');
}
$this->message = new IXR_Message($data);I’m testing with WordPress 7.1.1 and Woo Tax 3.6.16
- This reply was modified 2 weeks, 1 day ago by Mike Carter.
Forum: Plugins
In reply to: [Contact Form 7] Hooks and i18n JS includesYes, I believe
wp_deregister_script( 'wp-i18n' )will remove wp-hooks as well, and provided that another plugin isn’t using it.Try placing that function call inside of a
wp_enqueue_scriptsaction.Hope that helps!
Forum: Plugins
In reply to: [Contact Form 7] Hooks and i18n JS includesIn my case, I’m unable to deregister that script, because apparently woocommerce is using wp-i18n for a block that involves stripe payments.
Funny that CF7 seems to have a call to load that script as well.
Forum: Plugins
In reply to: [Contact Form 7] Hooks and i18n JS includesNo, I did not, but adding the following to the functions.php file of your theme does prevent that script from being loaded:
wp_deregister_script( 'wp-i18n' );I tested this, and my contact form is still submitted successfully. You may want to be careful in case it breaks something else. I really don’t know why that particular script is being loaded by CF7, but assuming there is some reason for it?
Forum: Plugins
In reply to: [Contact Form 7] Hooks and i18n JS includesHi Takayuki,
Thanks! Yes, that might be useful.
I’m specifically curious about this change to index.asset.php
Do you know why the dependency for wp-i18n was added? I’m not using any sort of internationalization in my contact forms and would prefer not to load that script on pages that use a contact form.
Mike
Forum: Plugins
In reply to: [WooPayments: Integrated WooCommerce Payments] CC Field is Disabled on iPhoneI wanted to follow up on this issue. It seemed to be temporarily resolved but later resurfaced.
Things we tried or tested, that did not work:
- Switching to the Storefront theme
- Disabling all optional plugins
What finally worked was switching to a different Stripe payment plugin. The majority of my customers are on iPhones, so it’s definitely not a bug I can live with. Hope this issue can be resolved in a future release of WooPayments. I’d be willing to give it another go at a future point.