There are loopholes and no act is terrible, shameful! , vulnerability as _php tutorial

Source: Internet
Author: User

There are loopholes and no act is terrible, shameful! , the vulnerability as


Security issues:

Whether there is permission to curd, because the parameters in the address bar, can be modified, (or parameters in the HTML page, you can use Firebug to modify the source code), so before curd to check whether the operator has this record, For example: According to the store ID and the parameters passed to query whether this record belongs to this operator, if not belong to the prompt (illegal operation, has been recorded!) To achieve the purpose of the warning)

For example:

    

    /*      * Verify that you have permission to     curd*    /publicfunction Check_rbac ($theme _id ) {        $model=M ();         $adm _session = es_session::get (MD5(conf ("Bi_auth_key")), 1);         $location _id=$adm _session[' supplier_locations '];         $map=array(' id ' = =$theme _id, ' location_id ' = =$location _id) ;         $result=$model->where ($map)->getfield (' id ');         if (empty($result)) {            $this->error (' Illegal operation, has been recorded! ');        }    }

  

http://www.bkjia.com/PHPjc/1080769.html www.bkjia.com true http://www.bkjia.com/PHPjc/1080769.html techarticle there are loopholes and no act is terrible, shameful! , the vulnerability as a security issue: whether there is permission to curd, because the parameters in the address bar, can be modified, (or parameters in the HTML page, can ... )

  • 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.