Skip to content

Commit 17c79b6

Browse files
committed
Load forwarded ticket/transaction as the original creator
To prevent potential information leaks in some edge cases, the generated content of the forwarded ticket/transaction is now tied to the user performing the forward action, instead of the scrip action current user, which is the system user.
1 parent d5cae32 commit 17c79b6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/RT/Action/SendForward.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sub Prepare {
6666
my $txn = $self->TransactionObj;
6767

6868
if ( $txn->Type eq 'Forward Transaction' ) {
69-
my $forwarded_txn = RT::Transaction->new( $self->CurrentUser );
69+
my $forwarded_txn = RT::Transaction->new( $txn->CreatorObj );
7070
$forwarded_txn->Load( $txn->Field );
7171
$self->{ForwardedTransactionObj} = $forwarded_txn;
7272
}
@@ -90,7 +90,9 @@ sub Prepare {
9090
$entity = $self->ForwardedTransactionObj->ContentAsMIME( ExpandAttachHeaders => 1 );
9191
}
9292
else {
93-
my $txns = $self->TicketObj->Transactions;
93+
my $ticket = RT::Ticket->new( $txn->CreatorObj );
94+
$ticket->Load( $self->TicketObj->Id );
95+
my $txns = $ticket->Transactions;
9496
$txns->Limit(
9597
FIELD => 'Type',
9698
OPERATOR => 'IN',

0 commit comments

Comments
 (0)