Error xmlrpc.php in firewall.php
-
I found an error in the plugin that causes the xmlrpc.php file of 401 Unauthorized and does not connect vien to jetpack.
The error is in public_html / wp-content / plugins / ninjafirewall / lib / firewall.php and removed the code that the file xmlrpc.php then works and gives the phrase that the file has to give as explained by wordpress since it is the jetpack credoir “XML-RPC server accepts POST requests only.”
code removed from firewall.php is:
if ( strpos($_SERVER['SCRIPT_NAME'], 'wp-login.php' ) !== FALSE ) { nfw_bfd(1); } elseif ( strpos($_SERVER['SCRIPT_NAME'], 'xmlrpc.php' ) !== FALSE ) { // Only POST requests are allowed: if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] !== 'POST' ) { // ret_code, ret_message etc aren't defined because // we didn't load the firewall configuration yet: $nfw_['nfw_options']['ret_code'] = '401'; nfw_log('XMLRPC API: unauthorized REQUEST_METHOD', "REQUEST_METHOD: {$_SERVER['REQUEST_METHOD']}", 2, 0); header('HTTP/1.0 401 Unauthorized'); exit('401 Unauthorized'); } nfw_bfd(2); }
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Error xmlrpc.php in firewall.php’ is closed to new replies.