Matthimatiker / MolComponents

Library with use-at-will architecture that extends the functionality of Zend Framework 1. Main features: Improved bootstrapping with lazy loading of resources, declaration of request parameters as argument in controller actions, advanced form creation and validation, mail templates, lightweight controller testing.
Other
2 stars 0 forks source link

Create CSRF plugin #26

Closed Matthimatiker closed 12 years ago

Matthimatiker commented 12 years ago

Create a form factory plugin that adds CSRF tokens to create form instances.

Matthimatiker commented 12 years ago

Created plugin Mol_Form_Factory_Plugin_Csrf.

The plugin can also be activated via configuration:

resources.form.plugins.csrf.class = "Mol_Form_Factory_Plugin_Csrf"
resources.form.plugins.csrf.options.element.name    = "my_csrf_token"
resources.form.plugins.csrf.options.element.salt    = "secret-salt"
resources.form.plugins.csrf.options.element.timeout = 1800