Skip to content

Commit

Permalink
Only enable CSRF argument stashing in refresh URL if CSRF is enabled
Browse files Browse the repository at this point in the history
Not only is it only necessary if CSRF protections are on, but RT does
not expand CSRF_Token unless RestrictReferrer is enabled.
  • Loading branch information
alexmv committed May 7, 2012
1 parent 096e31e commit 299b660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/html/Search/Results.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
my $refresh = $session{'tickets_refresh_interval'}
|| RT->Config->Get('SearchResultsRefreshInterval', $session{'CurrentUser'} );

if ($refresh and not $m->request_args->{CSRF_Token}) {
if (RT->Config->Get('RestrictReferrer') and $refresh and not $m->request_args->{CSRF_Token}) {
my $token = RT::Interface::Web::StoreRequestToken( $session{'CurrentSearchHash'} );
$m->notes->{RefreshURL} = RT->Config->Get('WebURL')
. "Search/Results.html?CSRF_Token="
Expand Down

0 comments on commit 299b660

Please sign in to comment.