dedecms v5.1 WriteBookText() code injection vul注入漏洞


本文整理自网络,侵删。


\include\inc_bookfunctions.php 
--------------------------------------------------- 
…… 
代码如下:

function WriteBookText($cid,$body)  
{<span id="more-1944"></span>  
global $cfg_cmspath,$cfg_basedir;  
$ipath = $cfg_cmspath."/data/textdata";  
$tpath = ceil($cid/5000);  
if(!is_dir($cfg_basedir.$ipath)) MkdirAll($cfg_basedir.$ipath,$GLOBALS['cfg_dir_purview']);  
if(!is_dir($cfg_basedir.$ipath.'/'.$tpath)) MkdirAll($cfg_basedir.$ipath.'/'.$tpath,$GLOBALS['cfg_dir_purview']);  
$bookfile = $cfg_basedir.$ipath."/{$tpath}/bk{$cid}.php";  
$body = "&lt;"."?php\r\n".$body."\r\n?"."&gt;";  
@$fp = fopen($bookfile,'w');  
@flock($fp);  
@fwrite($fp,$body);  
@fclose($fp);  
<div id="qhide_185676" class="qt" style="display: block;">}  

</div>  
…… 

—————————————————

\member\story_add_content_action.php
—————————————————

…… 

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...