Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Fixed bug#10099: Missing challenge token checks on customer interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Dec 20, 2013
1 parent 5a3b34f commit 92f4172
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
@@ -1,4 +1,5 @@
#3.3.4 201?-??-??
- 2013-12-20 Fixed bug#[10099](http://bugs.otrs.org/show_bug.cgi?id=10099) - Missing challenge token checks on customer interface.
- 2013-12-18 Fixed bug#[10110](http://bugs.otrs.org/show_bug.cgi?id=10110) - Stats list may show too few or too many stats.
- 2013-12-17 Fixed bug#[10103](http://bugs.otrs.org/show_bug.cgi?id=10103) - ArticleTypeID is always undef in AgentTicketCompose
- 2013-12-16 Fixed bug#[10080](http://bugs.otrs.org/show_bug.cgi?id=10080) - Bad group check in otrs-scheduler-linux.
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/CustomerPreferences.pm
Expand Up @@ -44,7 +44,7 @@ sub Run {
if ( $Self->{Subaction} eq 'Update' ) {

# challenge token check for write action
$Self->{LayoutObject}->ChallengeTokenCheck();
$Self->{LayoutObject}->ChallengeTokenCheck(Type => 'Customer');

# check group param
my $Group = $Self->{ParamObject}->GetParam( Param => 'Group' ) || '';
Expand Down
4 changes: 4 additions & 0 deletions Kernel/Modules/CustomerTicketMessage.pm
Expand Up @@ -222,6 +222,10 @@ sub Run {
return $Output;
}
elsif ( $Self->{Subaction} eq 'StoreNew' ) {

# challenge token check for write action
$Self->{LayoutObject}->ChallengeTokenCheck(Type => 'Customer');

my $NextScreen = $Self->{Config}->{NextScreenAfterNewTicket};
my %Error;

Expand Down
2 changes: 1 addition & 1 deletion Kernel/Modules/CustomerTicketProcess.pm
Expand Up @@ -338,7 +338,7 @@ sub Run {
}

if ( $Self->{Subaction} eq 'StoreActivityDialog' && $ProcessEntityID ) {
$Self->{LayoutObject}->ChallengeTokenCheck();
$Self->{LayoutObject}->ChallengeTokenCheck(Type => 'Customer');

return $Self->_StoreActivityDialog(
%Param,
Expand Down
4 changes: 4 additions & 0 deletions Kernel/Modules/CustomerTicketZoom.pm
Expand Up @@ -320,6 +320,10 @@ sub Run {

# check follow up
elsif ( $Self->{Subaction} eq 'Store' ) {

# challenge token check for write action
$Self->{LayoutObject}->ChallengeTokenCheck(Type => 'Customer');

my $NextScreen = $Self->{NextScreen} || $Self->{Config}->{NextScreenAfterFollowUp};
my %Error;

Expand Down
14 changes: 10 additions & 4 deletions Kernel/Output/HTML/Layout.pm
Expand Up @@ -1147,11 +1147,17 @@ sub ChallengeTokenCheck {
}

# no valid token found
$Self->FatalError(
Message => 'Invalid Challenge Token!',
);
if ($Param{Type} && lc $Param{Type} eq 'customer') {
$Self->CustomerFatalError(
Message => 'Invalid Challenge Token!',
);
}
else {
$Self->FatalError(
Message => 'Invalid Challenge Token!',
);
}

# ChallengeToken ok
return;
}

Expand Down

0 comments on commit 92f4172

Please sign in to comment.