Latest Version: 0.9.6.2

secure

Security related decorators


Functions

f authenticate_form(f) ...

Decorator for authenticating a form according to an authorization token stored in the client's session. For prevention of certain Cross-site request forgery (CSRF) attacks (See http://en.wikipedia.org/wiki/Cross-site_request_forgery for more information).

For use with the webhelpers.rails.secure_form_tag helper functions.

f https(*redirect_args, **redirect_kwargs) ...

Decorator to redirect to the SSL version of a page if not currently using HTTPS. Takes as arguments the parameters to pass to redirect_to. (Specify no arguments necessary to redirect the current page). Apply this decorator to controller methods (actions).

Non-https POST requests are aborted (405 response code) by this decorator.

Example:

See the source for more information.

Top