Add form tokens to several forms.
This commit is contained in:
parent
5a62611b00
commit
2be4a5f9d0
5 changed files with 13 additions and 1 deletions
|
@ -23,6 +23,10 @@ class Application_Form_EditUser extends Zend_Form
|
||||||
array('ViewScript', array('viewScript' => 'form/edit-user.phtml', "currentUser" => $currentUser->getLogin()))));
|
array('ViewScript', array('viewScript' => 'form/edit-user.phtml', "currentUser" => $currentUser->getLogin()))));
|
||||||
$this->setAttrib('id', 'current-user-form');
|
$this->setAttrib('id', 'current-user-form');
|
||||||
|
|
||||||
|
$this->addElement('hash', 'csrf', array(
|
||||||
|
'salt' => 'unique'
|
||||||
|
));
|
||||||
|
|
||||||
$hidden = new Zend_Form_Element_Hidden('cu_user_id');
|
$hidden = new Zend_Form_Element_Hidden('cu_user_id');
|
||||||
$hidden->setDecorators(array('ViewHelper'));
|
$hidden->setDecorators(array('ViewHelper'));
|
||||||
$hidden->setValue($userData["id"]);
|
$hidden->setValue($userData["id"]);
|
||||||
|
|
|
@ -10,6 +10,10 @@ class Application_Form_Login extends Zend_Form
|
||||||
// Set the method for the display form to POST
|
// Set the method for the display form to POST
|
||||||
$this->setMethod('post');
|
$this->setMethod('post');
|
||||||
|
|
||||||
|
$this->addElement('hash', 'csrf', array(
|
||||||
|
'salt' => 'unique'
|
||||||
|
));
|
||||||
|
|
||||||
$this->setDecorators(array(
|
$this->setDecorators(array(
|
||||||
array('ViewScript', array('viewScript' => 'form/login.phtml'))
|
array('ViewScript', array('viewScript' => 'form/login.phtml'))
|
||||||
));
|
));
|
||||||
|
|
|
@ -157,6 +157,9 @@
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<?php echo $this->element->getElement('csrf') ?>
|
||||||
|
|
||||||
<button type="submit" id="cu_save_user" class="btn btn-small right-floated"><?php echo _("Save")?></button>
|
<button type="submit" id="cu_save_user" class="btn btn-small right-floated"><?php echo _("Save")?></button>
|
||||||
</dl>
|
</dl>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
<?php echo $this->element->getElement('locale') ?>
|
<?php echo $this->element->getElement('locale') ?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<?php echo $this->element->getElement('csrf') ?>
|
||||||
|
|
||||||
<?php if (Application_Model_Preference::GetEnableSystemEmail()): ?>
|
<?php if (Application_Model_Preference::GetEnableSystemEmail()): ?>
|
||||||
<dt id="reset-label" class="hidden"> </dt>
|
<dt id="reset-label" class="hidden"> </dt>
|
||||||
<dd id="reset-element" class="text-right">
|
<dd id="reset-element" class="text-right">
|
||||||
|
|
1
airtime_mvc/public/js/libs/underscore-min.js
vendored
1
airtime_mvc/public/js/libs/underscore-min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue