WordPress博客出现的绝对路径泄露漏洞及修复方法
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>某天用360的漏洞检测,总共用了56分钟才检测完。 <br>
检测结果如图:<br><br><img title="WordPress博客出现的绝对路径泄露漏洞及修复方法" alt="WordPress博客出现的绝对路径泄露漏洞及修复方法" src="https://zhuji.jb51.net/uploads/img/202305/357e86fc9dbbfe85cddf82a181f94300.jpg" style="max-width:100%!important;height:auto!important;border: 1px solid rgb(204, 204, 204); vertical-align: middle; padding: 1px; overflow: hidden; max-width: 696px; width: 672px; height: 183px;"><br>
漏洞修复 <br><br>
漏洞文件:(根据报警信息,修改这些文件,并不是每个人都一样) <br><br>
1、/wp-includes/registration-functions.php <br>
2、/wp-admin/admin-functions.php <br><br>
修复方法一:在以上文件的的头部 error_reporting(0); <br><br>
修复方法二:找到/wp-includes/registration-functions.php文件将代码:<br><br>
</p>
<div style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<div style="margin: 0px; padding: 0px; outline: none; float: right; line-height: 25.2px; font-size: 14px;">
<span style="line-height: 25.2px; cursor: pointer;"><u>复制代码</u></span>
</div>
代码如下:</div>
<div id="phpcode2" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
/**<br>
* Deprecated. No longer needed.<br>
*<br>
* @package WordPress<br>
*/<br>
_deprecated_file( basename(__FILE__), ‘2.1’, null, __( ‘This file no longer needs to be included.’ ) );</div>
<br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><span style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'>全部改成:</span><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><br style='font-family: tahoma, arial, "Microsoft YaHei"; font-size: 14px;'><div style='margin: 3px auto 0px; padding: 0px 3px; outline: none; line-height: 21.6px; clear: both; border-width: 1px; border-style: solid; border-color: rgb(0, 153, 204); background: rgb(246, 251, 255); overflow: hidden; font-family: tahoma, arial, "Microsoft YaHei";'>
<div style="margin: 0px; padding: 0px; outline: none; float: right; line-height: 25.2px; font-size: 14px;">
<span style="line-height: 25.2px; cursor: pointer;"><u>复制代码</u></span>
</div>
代码如下:</div>
<div id="phpcode3" style='margin: 0px auto 3px; padding: 0px 3px; outline: none; line-height: 25.2px; font-size: 14px; clear: both; border-right: 1px solid rgb(0, 153, 204); background: rgb(221, 237, 251); overflow: hidden; border-left: 1px solid rgb(0, 153, 204); word-break: break-all; border-bottom: 1px solid rgb(0, 153, 204); word-wrap: break-word; font-family: tahoma, arial, "Microsoft YaHei";'>
<br>
* Deprecated. No longer needed.<br>
*<br>
* @package WordPress<br>
*/<br>
@_deprecated_file( basename(__FILE__), ’2.1′, null, __( ’This file no longer needs to be included.’ ) );</div>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
</p>
<p style='margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";'>
修复方法三:进入PHP.INI禁用PHP报错。</p>
頁:
[1]