Commit f9b138b4 by Dirk Benkert

removed CSRF protection from file upload form because bigger uploads exceed…

removed CSRF protection from file upload form because bigger uploads exceed session timeout and CSRF invalidates here
parent 2f5d1026
......@@ -78,10 +78,10 @@ class FileForm extends AbstractForm {
$this->setAttribute('method', 'post');
$this->add(array(
'name' => 'csrf',
'type' => 'Zend\Form\Element\Csrf',
));
// $this->add(array(
// 'name' => 'csrf',
// 'type' => 'Zend\Form\Element\Csrf',
// ));
$this->add(array(
'name' => 'id',
......@@ -177,20 +177,20 @@ class FileForm extends AbstractForm {
),
)));
$inputFilter->add($factory->createInput(array(
'name' => 'csrf',
'required' => true,
'allowEmpty' => false,
'filters' => array(
array('name' => 'StripTags'),
array('name' => 'StringTrim'),
),
'validators' => array(
array(
'name' => 'Csrf'
)
)
)));
// $inputFilter->add($factory->createInput(array(
// 'name' => 'csrf',
// 'required' => true,
// 'allowEmpty' => false,
// 'filters' => array(
// array('name' => 'StripTags'),
// array('name' => 'StringTrim'),
// ),
// 'validators' => array(
// array(
// 'name' => 'Csrf'
// )
// )
// )));
$this->inputFilter = $inputFilter;
}
......
......@@ -33,7 +33,7 @@
<?php
$form->prepare();
echo $this->formElement($form->get('id'));
echo $this->formElement($form->get('csrf'));
//echo $this->formElement($form->get('csrf'));
echo $this->formElement($form->get('folder'));
?>
<?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment