Provide a framework for CSRF protection, with tests.

Add CSRF protection to Asset editSave, AssetManager, VersionTags and Group operations.
This commit is contained in:
Colin Kuskie 2009-07-06 16:58:57 +00:00
parent 4664ab7035
commit 5e4db3adb4
19 changed files with 362 additions and 62 deletions

View file

@ -102,6 +102,20 @@ sub addTab {
return $self->{_tab}{$name}{form};
}
#-------------------------------------------------------------------
=head2 csrfToken ( )
Adds the WebGUI CSRF token to the form. Really a wrapper for WebGUI::Form::CsrfToken.
=cut
sub csrfToken {
my $self = shift;
$self->{_hidden} .= WebGUI::Form::CsrfToken($self->session);
}
#-------------------------------------------------------------------
=head2 formHeader ( hashRef )