English 中文(简体)
cakephp 正在做间谍——如何?
原标题:cakephp form getting spammed - how?

我有一个简单的震.实验室表格,可以提交数据库。 它不需要在用户中作标记。

通常不通过浏览器使用表格,也不在所有所需领域填满表格,造成验证错误,表格不提交。

然而,我似乎正在有人/一些人的间谍。 它们正在填充通用名称的领域(名称、电子邮件、message等),但不是模糊的领域,这些记录正在输入数据库,以便它们明显绕过验证!

我的问题是HOW? (以及我如何阻止这些?)

我的感觉是,我没有明显漏洞或东西......

这是我的补充方法:

    function add() {
    $this->pageTitle =  Projects - Submit Project ;
    if (!empty($this->data)) {
        $this->Project->create();
        if ($this->Project->save($this->data)) {
            $this->Session->setFlash(__( The Project has been saved , true));
            $this->_sendStaffMail($this->Project->id);
            $this->_sendClientMail($this->Project->id);
            $this->redirect(array( controller  =>  pages ,  action => thanks ));
        } else {
            $this->Session->setFlash(__( The Project could not be saved. Please, try again. , true));
        }
    }
}

《示范法》的确认:

    var $validate = array(
     name  => array( notempty ),
     department  => array( notempty ),
     client  => array( notempty ),
     contact_name  => array( notempty ),
     email  => array( email ),
     phone  => array( notempty ),
     title  => array( notempty ),
     background  => array( notempty ),
     objectives  => array( notempty ),
     target_audience  => array( notempty ),
     message  => array( notempty ),
     logos  => array( notempty ),
     images  => array( notempty ),
     print_info  => array( notempty )

);

我也应当提到,我曾尝试过安全部分,但在我整个项目有吨种时,似乎已经过杀人(当时他们又回到Austhlogin后面)。

最佳回答

你们需要扩大鉴定范围,以列入比简单的辛迪加允许的几种选择。

<?php
    public $validate            =    array(
         name                   =>   array(
             nameNotEmpty       =>   array(
                 required       =>   true, // make sure the $data[  Model  ][  name  ] key exists
                 allowEmpty     =>   false, // make sure the $data[  Model  ][  name  ] value exists
                 rule           =>   array(  notEmpty  ), // make sure the value isn t empty.
                 message        =>    Name is required. ,
            ),
        ),
    );
?>

关于该规则的评论应当解释为什么每个钥匙都存在。 The notEmpty rule and the AdmissionEmpty => false are Double but i Hope a rule in the declaration so that Yous see the key in where and.15/ to取而代之的是适当的验证规则(即Unique, minLength等)

Edited: More info

基本情况是,有人直接要求采取包括具有明显关键特征的员额阵列的形式行动。 由于你的验证规则,如果忽略某些较为具体的信息,则对这些领域没有进行验证。 不仅验证钥匙的数据,而且验证钥匙的存在本身使用所要求的=和;真实旗帜。 如果钥匙还不能仅仅包含白天空间或空洞价值(要求=1>真的只是确保以表格形式包含外地),那么你就使用允许状=和假冒。

问题回答

我猜测到该职位数据时,该轮机通过时的斜线含有目标_audience和Cake isnt加以验证的田地。

你们想要做的是添加必要的验证规则。

空洞的规则只有在数据阵列的价值被通过时才能加以核对,即它只是一个白天空间,这就要求保证,在模型被挽救之前,实际存在这个领域。

我真的在这里谈论(即不是具体针对卡纳克民阵),但是否值得考虑一个 cap场?

另外,关于分子反垃圾邮件服务的情况如何? 除有大量交通的经营者外,许多网站运营商都可以免费使用。 a. 与任何CMS公司合作。

您的卡萨潘普是否接受安全或证明——用户——人——的问题,作为optional<>/em>论据参数? 审视一下CakePHP(即执行流到哪里,PHP代码是哪里)与从客户方向服务器传送的HTTP表POST CGI参数数据。

贵国的数据库记录/密码是否足够可靠?





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

MALICIOUS_CODE EI_EXPOSE_REP Medium

I run findbugs against all of my code and only tackle the top stuff. I finally got the top stuff resolved and now am looking at the details. I have a simple entity, say a user: public class User ...

XSS on jsbin.com

Anyone know if jsbin.com implements any protection for XSS or other javascript attacks? I see jsbin links used fairly regularly on sites like this one and I can t find any indication from the site ...

Make md5 strong

Im making a website that will intergrate with game that only support md5 hashing metod (atm). Which ofc is not especially safe anymore. But how could i make it stronger? Should I just generate long ...

Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

热门标签