DedeCMSV53 released, but still not the variable thorough repair coverage holes. This loophole and ryat in that very similar 🙂
See the code in the core file include / common.inc.php
- //
- foreach($_REQUEST as $_k=>$_v)
- {
- if( strlen($_k)>0 && eregi(‘^(_|cfg_|GLOBALS)’,$_k) && !isset($_COOKIE[$_k]) )//?
- {
- exit(‘Request var not allow!’);
- }
- }
This place can be bypassed by submitting _COOKIE variable filter cfg_ keyword followed by the code of the registered variable
- foreach(Array(‘_GET’,‘_POST’,‘_COOKIE’) as $_request)
- {
- foreach($$_request as $_k => $_v) ${$_k} = _RunMagicQuotes($_v);
- }
Then initialize the variable
- //
- require_once(DEDEDATA.‘/common.inc.php’);
- //
- require_once(DEDEDATA.“/config.cache.inc.php”);
Seemingly can not use, but fortunately this piece of code in the final document
- //?
- if($_FILES)
- {
- require_once(DEDEINC.‘/uploadsafe.inc.php’);
- }
Look what we uploadsafe.inc.php
- foreach($_FILES as $_key=>$_value)
- {
- foreach($keyarr as $k)
- {
- if(!isset($_FILES[$_key][$k]))
- {
- exit(‘Request Error!’);
- }
- }
- $$_key = $_FILES[$_key][‘tmp_name’] = str_replace(“////”,“//”,$_FILES[$_key][‘tmp_name’]);
- //?common.inc.php?$_FILES[$_key][‘tmp_name’]
By submitting similar common.inc.php? _FILES [Cfg_xxxx the [tmp_name] = aaaaaa & …… to cover cfg_xxxx
Use the time to pay attention to the cookie assignment, while bypass uploadsafe.inc.php inside judgments
