secure_form_tag

Secure Form Tag Helpers -- For prevention of Cross-site request forgery (CSRF) attacks.

Generates form tags that include client-specific authorization tokens to be verified by the destined web app.

Authorization tokens are stored in the client's session. The web app can then verify the request's submitted authorization token with the value in the client's session.

This ensures the request came from the originating page. See http://en.wikipedia.org/wiki/Cross-site_request_forgery for more information.

Pylons provides an authenticate_form decorator that does this verfication on the behalf of controllers.


Functions

f secure_form(url, **args) ...

Create a form tag (like webhelpers.rails.form_tag.form) including a hidden authentication token field.

f secure_form_remote_tag(**args) ...

Create a form tag (like webhelpers.rails.prototype.form_remote_tag) including a hidden authentication token field.

See the source for more information.