title: security component of cakephp restricts form submission
body: <p>I am facing a strange problem with the security component.</p>
  
  <p>I have a form with following fields in it:</p>
  
  <pre><code>First Name (firstname)
  Last Name (lastname)
  Primary Email (primaryemail)
  Password (password)
  Retype Password
  Secondary Email (secondaryemail)
  Residence Address (address)
  State
  City (city_id)
  Location (location_id)
  Designation (employeetype_id)
  Pincode (pincode)
  Residence Phone (residencephone)
  Mobile Phone (mobilephone)
  Office Phone 1 (officephone1)
  Office Phone 2 (officephone2)
  Department (department_id)
  </code></pre>
  
  <p>all the fields mentioned above which have a secondary name in brackets are the fileds which are present in database table and those who have not are not there in the database table.</p>
  
  <p>i.e.
  I have added states, retype password as an extra in the form.</p>
  
  <p>The main problem is that the "Security" component is blocking from adding a new record to the databse table.</p>
  
  <p>I have added the above two fields to the ignored list array but it still doesn't submits and <strong>generates a blackholed request</strong>.</p>
  
  <p>The code for add method of controller is as follows:</p>
  
  <pre><code>function add()
  {
      if( !empty($this-&gt;data) )
      {
          $this-&gt;Employee-&gt;create();
          if( $this-&gt;Employee-&gt;save($this-&gt;data) )
          {
              $this-&gt;Session-&gt;setFlash(__('The employee has been saved', true), 'success');
              $this-&gt;redirect(array('action' =&gt; 'index'));
          }
          else
          {
              $this-&gt;Session-&gt;setFlash(__('The employee could not be saved. Please, try again.', true), 'error');
          }
      }
  
      $states = $this-&gt;Employee-&gt;City-&gt;State-&gt;find('list', array(
          'order' =&gt; array('name ASC')
      ));
  
      $employeetypes = $this-&gt;Employee-&gt;Employeetype-&gt;find('list', array(
          'conditions' =&gt; array('Employeetype.id &lt;&gt; ' =&gt; '1'),
          'order' =&gt; array('name ASC')
      ));
  
      $departments = $this-&gt;Employee-&gt;Department-&gt;find('list', array(
          'order' =&gt; array('name ASC')
      ));
  
      $locations = $this-&gt;Employee-&gt;Location-&gt;find('list', array(
          'order' =&gt; array('name ASC')
      ));
  
      $this-&gt;set(compact('states', 'employeetypes', 'departments', 'locations'));
  }
  </code></pre>
  
  <p>View file add.ctp is having the following code:</p>
  
  <pre><code>&lt;div class="employees form"&gt;
  &lt;?php echo $this-&gt;Form-&gt;create('Employee');?&gt;
      &lt;fieldset&gt;
          &lt;legend&gt;&lt;?php __('New Employee'); ?&gt;&lt;/legend&gt;
      &lt;?php
          echo $this-&gt;element('employee_form');
      ?&gt;
      &lt;/fieldset&gt;
  &lt;?php echo $this-&gt;Form-&gt;end(__('Submit', true));?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the code for the element "employee_form" is as follows:</p>
  
  <pre><code>&lt;?php
  echo $this-&gt;Html-&gt;script('jquery.validate.min');
  echo $this-&gt;Html-&gt;script('common');
  echo $this-&gt;Html-&gt;script('jquery.typewatch');
  ?&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
  
          $("form").validate({
              errorClass: "jqueryError",
              errorElement: 'label',
              debug: false,
              submitHandler: function(form) {
                  $(':submit', form).attr('disabled', 'disabled').addClass('inactive');
                  form.submit();
              }
          });
  
          $('#EmployeeStateId').change(function() {
              if($('#EmployeeStateId').val() != "")
              {
                  populateSelectBox('EmployeeCityId', 'get', '&lt;?php echo $this-&gt;Html-&gt;url(array('controller' =&gt; 'cities', 'action' =&gt; 'getCities', 'admin' =&gt; false)); ?&gt;', {stateId: $(this).val()});
              }
              else
              {
                  $('#EmployeeCityId').empty();
              }
          });
  
          $('#EmployeePrimaryemail').typeWatch(750, function(){
              var $email = $('#EmployeePrimaryemail');
              var $response = $('#response');
              var $btnSubmit = $('submit');
              var re = new RegExp("^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$");
  
              if($email.val() != '' &amp;&amp; re.test($email.val()) )
              {
                  $.ajax({
                      type: 'get',
                      url: '&lt;?php echo $this-&gt;Html-&gt;url(array('controller' =&gt; 'employees', 'action' =&gt; 'checkEmail', 'admin' =&gt; false)); ?&gt;',
                      data: {
                          email: $email.val()
                      },
                      dataType: 'text',
                      success: function(data)
                      {
                          if(data == '1')
                          {
                              $response.attr('style', '')
                              .attr('style', "color:red;")
                              .html('Email already registered please enter a different email.');
                              $btnSubmit.attr('disabled',true);
                          }
                          else if(data == '0')
                          {
                              $response.attr('style', '')
                              .attr('style', "color:green;")
                              .html('Available');
                              $btnSubmit.attr('disabled',false);
                          }
                          else
                          {
                              $response.attr('style', '')
                              .attr('style', "color:red;")
                              .html('Error occured while attempting to connect with the server. Please try again after some time.');
                              $btnSubmit.attr('disabled',true);
                          }
                      },
                      beforeSend: function(){
                          $email.addClass('show_loading_in_right')
                      },
                      complete: function(){
                          $email.removeClass('show_loading_in_right')
                      }
                  });
              }
              else
              {
                  $response.attr('style', '')
                  .attr('style', "display:none;")
                  .html("");
              }
          });
  
      });
  &lt;/script&gt;
  
  &lt;?php
  echo $this-&gt;Form-&gt;input('firstname', array(
      'label' =&gt; 'First Name',
      'class' =&gt; 'required',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Only letters and numbers, atleast 2 characters)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('lastname', array(
      'label' =&gt; 'Last Name',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Atleast 3 characters)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('primaryemail', array(
      'label' =&gt; 'Primary Email',
      'class' =&gt; 'required email',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(This will be your username)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Html-&gt;div('', '', array(
      'id' =&gt; 'response', 'style' =&gt; 'display:none'
  ));
  
  echo $this-&gt;Form-&gt;input('password', array(
      'label' =&gt; 'Password',
      'class' =&gt; 'required',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Atleast 4 characters long)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('retypePassword', array(
      'label' =&gt; 'Retype Password',
      'type' =&gt; 'password',
      'equalto' =&gt; '#EmployeePassword',
      'class' =&gt; 'required',
      'secure' =&gt; false,
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Should be exactly same as password entered above)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('secondaryemail', array(
      'label' =&gt; 'Secondary Email',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Enter your secondary email, if any)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('state_id', array(
      'type' =&gt; 'select',
      'secure' =&gt; false,
      'options' =&gt; $states,
      'empty' =&gt; 'Select',
      'label' =&gt; 'State',
      'class' =&gt; 'required',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Choose your state)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('city_id', array(
      'label' =&gt; 'City',
      'class' =&gt; 'required',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Choose your city)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('address', array(
      'label' =&gt; 'Residence Address',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Enter your address)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('pincode', array(
      'label' =&gt; 'Pincode',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Enter pincode)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('residencephone', array(
      'class' =&gt; 'required',
      'label' =&gt; 'Residence Phone',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Enter your phone number, if any)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('mobilephone', array(
      'label' =&gt; 'Mobile Phone',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Enter your mobile number, if any)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('location_id', array(
      'label' =&gt; 'Location',
      'class' =&gt; 'required',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Choose your work location)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('employeetype_id', array(
      'class' =&gt; 'required',
      'label' =&gt; 'Your Profile',
      'type' =&gt; 'select',
      'options' =&gt; $employeetypes,
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Select your company profile or role)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('officephone1', array(
      'class' =&gt; 'required',
      'label' =&gt; 'Office Phone 1',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Enter your office\'s number 1, if any)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('officephone2', array(
      'label' =&gt; 'Office Phone 2',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Enter your office\'s number 2, if any)', array('class' =&gt; 'description'))
  ));
  
  echo $this-&gt;Form-&gt;input('department_id', array(
      'type' =&gt; 'select',
      'options' =&gt; $departments,
      'label' =&gt; 'Department',
      'class' =&gt; 'required',
      'between' =&gt; $this-&gt;Html-&gt;tag('span', '(Choose your department)', array('class' =&gt; 'description'))
  ));
  ?&gt;
  </code></pre>
  
  <p>What might be the problem ? I don't want to disable the validatePost property in the controller.</p>
  
  <p>Any help is greatly appreciated. I am using the latest version of cakephp (1.3.3)</p>
  
  <p>Thanks</p>