Commit 5163543c authored by Jae Proctor's avatar Jae Proctor
Browse files

Issue #3206501: Redirects to external URLs are not allowed by default, use...

Issue #3206501: Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it
parent 216af387
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -271,7 +271,10 @@ function saml_sp_start($idp, $callback, $forceAuthn = FALSE) {
  $language = \Drupal::languageManager()->getCurrentLanguage();
  if (isset($_GET['returnTo'])) {
    // If a returnTo parameter is present, then use that.
    $return_to = '/' . $_GET['returnTo'];
    $return_to = $_GET['returnTo'];
    if (substr($return_to, 0, 1) !== '/') {
      $return_to = '/' . $return_to;
    }
  }
  else {
    // By default user is returned to the front page in the same language.