summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Routing/RedirectDestination.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/lib/Drupal/Core/Routing/RedirectDestination.php')
-rw-r--r--core/lib/Drupal/Core/Routing/RedirectDestination.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/Routing/RedirectDestination.php b/core/lib/Drupal/Core/Routing/RedirectDestination.php
index 58d7184..7c80b11 100644
--- a/core/lib/Drupal/Core/Routing/RedirectDestination.php
+++ b/core/lib/Drupal/Core/Routing/RedirectDestination.php
@@ -62,7 +62,10 @@ class RedirectDestination implements RedirectDestinationInterface {
public function get() {
if (!isset($this->destination)) {
$query = $this->requestStack->getCurrentRequest()->query;
- if ($query->has('destination')) {
+ if (UrlHelper::isExternal($query->get('destination'))) {
+ $this->destination = '/';
+ }
+ elseif ($query->has('destination')) {
$this->destination = $query->get('destination');
}
else {