Doyocms parallel permission issue-order Leakage

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.