简体   繁体   English

在Wordpress中删除XSS脚本

[英]Removing XSS Script in Wordpress

I was trying to test my WordPress website security which right now I am baffled. 我试图测试我的WordPress网站安全性,现在我感到困惑。 In a form, I entered <script>alert('XSS Expoit worked');</script> in the input. 在表单中,我在输入中输入了<script>alert('XSS Expoit worked');</script> After submitting the form, a pop-up box appeared on the next page. 提交表单后,下一页会出现一个弹出框。 This means my form is not yet secured. 这意味着我的表格尚未安全。 But that's not the problem. 但那不是问题。

Let me explain first, the submission of that XSS script will be update in the user by update_user_meta() and should be available on the usermeta table in the database. 首先让我解释一下,XSS脚本的提交将由update_user_meta()在用户中更新,并且应该在数据库中的usermeta表上可用。

if(isset($_POST['submit_userinfo'])) {
    global $current_user;
    get_currentuserinfo();
    $user_id = $current_user->ID;
     if(!wp_verify_nonce($_POST['peoplesweep_user_form'],'peoplesweep_form_submit')){
            wp_die('Our Site is protected!!');
        }
        else{
            $nric = $_POST['nric'];
            update_user_meta( $user_id, 'nric', $nric );
            wp_redirect(get_permalink('next_page')); // next page after submission success
        }
}

The problem here is, I did not find the script in the table & every time I logout & login then skip to the next_page , the script still pops out. 这里的问题是,我没有在表中找到脚本,每次我退出并登录然后跳到next_page ,脚本仍会弹出。 I need to know where it was stored so that I can delete them . 我需要知道它的存储位置,以便我可以删除它们

Any ideas where the script stored? 脚本存储的任何想法? And/Or how am I going to review any changes in the database???? 和/或我如何审查数据库中的任何更改????

Did you try checking wp_usermeta table? 你试过检查wp_usermeta表吗? You can refer to this link to get a really helpful and detailed description of Wordpress database structure. 您可以参考此链接以获得Wordpress数据库结构的真正有用和详细的描述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM