Doyocms parallel permission issue-order Leakage
Doyocms parallel permission issue-order Leakage
Order unauthorized view Vulnerability
The problematic code is located at source/member. php.
function myorder(){if($this->syArgs('oid')||$this->syArgs('orderid',1)!=''){if($this->syArgs('oid')){$r=array('id'=>$this->syArgs('oid'));}else{$r=array('orderid'=>$this->syArgs('orderid',1));}$this->order=syDB('order')->find($r);if($this->order['state']>0&&$this->order['virtual']==1)$this->virtuals=syDB('product_virtual')->findAll(array('oid'=>$this->order['id'],'state'=>1));$this->goods=order_goods(unserialize($this->order['goods']),$this->order['logistics']);$this->info=unserialize($this->order['info']);$this->sendgoods=unserialize($this->order['sendgoods']);$total=0;foreach($this->goods[0] as $v){$total=calculate($total,$v['total']);$total=calculate($total,$v['logistics_price']);}$this->aggregate=calculate($total, $this->order['favorable'],2);$this->display("member/myorderinfo.html");}else{$c=syClass('c_order');$total_page=total_page($GLOBALS['G_DY']['db']['prefix'].'order where uid='.$this->my['id']);$this->lists=$c->syPager($this->syArgs('page',0,1),10,$total_page)->findAll(array('uid'=>$this->my['id']),' addtime desc ');$c_page=$c->syPager()->getPager();$this->pages=pagetxt($c_page,$GLOBALS['G_DY']['url']["url_path_base"].'?c=member&a=myorder');$this->display("member/myorder.html");}}
This code is used to view the user's order information
Row 254,255,256 is the key point
However, the condition used to query order information is too simple, which directly leads to viewing order information of other users by modifying URL parameters.
Verify that I registered two users, sss and zzz, and used the system administrator to inject some money (simulate the user) into the order for each item.
Modify the oid on the zzz user page.
He saw the products purchased by sss and the following order information.
I registered two users, sss and zzz, and used the system administrator to inject some money into the two (simulate the user) to form orders for each item.
Modify the oid on the zzz user page.
He saw the products purchased by sss and the following order information.
Solution:
Added uid parameter verification.