Skip to content

Commit

Permalink
prevent URLs that end in ? from causing redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwach committed Feb 22, 2018
1 parent eb39199 commit cea37e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Core/QuickForm/Action/Jump.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public function perform(&$page, $actionName) {
}
// generate the URL for the page 'display' event and redirect to it
$action = $current->getAttribute('action');
// prevent URLs that end in ? from causing redirects
$action = rtrim($action, '?');
// FIXME: this should be passed through CRM_Utils_System::url()
$url = $action . (FALSE === strpos($action, '?') ? '?' : '&') . $current->getButtonName('display') . '=true' . '&qfKey=' . $page->get('qfKey');

CRM_Utils_System::redirect($url);
Expand Down

0 comments on commit cea37e0

Please sign in to comment.