Add CSRF code to ProfileSettings edit profile field and edit profile category.
This commit is contained in:
parent
3b8d5f62bc
commit
d26c6b402b
1 changed files with 4 additions and 4 deletions
|
|
@ -201,8 +201,8 @@ Returns the user to www_editProfileSettings when done.
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editProfileCategorySave {
|
||||
my $session = shift;
|
||||
return $session->privilege->adminOnly() unless canView($session);
|
||||
my $session = shift;
|
||||
return $session->privilege->adminOnly() unless canView($session) && $session->form->validToken();
|
||||
my %data = (
|
||||
label => $session->form->text("label"),
|
||||
shortLabel => $session->form->text("shortLabel"),
|
||||
|
|
@ -359,8 +359,8 @@ Returns the user to www_editProfileSettings when done.
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editProfileFieldSave {
|
||||
my $session = shift;
|
||||
return $session->privilege->adminOnly() unless canView($session);
|
||||
my $session = shift;
|
||||
return $session->privilege->adminOnly() unless canView($session) && $session->form->validToken();
|
||||
|
||||
# Special case for WebGUI auth password recovery.
|
||||
my $requiredForPasswordRecovery = $session->form->yesNo('requiredForPasswordRecovery');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue