All ESPCMS versions can be accessed by any user

Source: Internet
Author: User

All ESPCMS versions can be accessed by any user

All ESPCMS versions can be accessed by any user

/Interface/memebermain. php

$rsMember['userid'] = $this->ec_member_username_id;$rsMember['rankname'] = $this->get_member_purview($rsMember['mcid'], 'rankname');$userid = intval($rsMember['userid']);



Follow up with ec_member_username_id

/Public/class_connector.php

$ User_info = explode ('|', $ this-> fun-> eccode ($ this-> fun-> accept ('ecisp _ member_info ', 'C '), 'decode', db_pscode); // from $ _ COOKIE ['ecisp _ member_info '] list ($ response, $ this-> ec_member_alias, $ ec_member_integral, $ ec_member_mcid, $ this-> ec_member_email, $ this-> ec_member_lastip, $ this-> ec_member_ipadd, $ this-> ec_member_useragent, $ this-> ec_member_adminclassurl) = $ user_info; $ this-> ec_member_username_id = intval ($ ec_member_username_id );



To sum up, the $ userid value is fully controllable, taking http://demo.ecisp.cn as an example, the process of using is as follows:

1. Registration, http://demo.ecisp.cn/index.php? Ac = member & at = reg


Assume that you want to log on to $ userid = 3, the user name is 3 test

 





2. After logging in, view the cookie and get

ecisp_member_username=C50S%2BB7auih2gDPIqEsfCZAX5nybIUZ%2FgbPTQp%2F6gm0%3D



3. Change the ecisp_member_info value in the cookie to the ecisp_member_username value,
 

ecisp_member_info=C50S%2BB7auih2gDPIqEsfCZAX5nybIUZ%2FgbPTQp%2F6gm0%3D



In this case, after decryption, you can obtain

$ Userid = $ this-> ec_member_username_id = intval ('3test') = 3



4. Refresh, http://demo.ecisp.cn/index.php again? Ac = membermain & at = center



 

 

Solution:

Switch to session

 

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.