From bf3c4907d52abb56a18e79639f831967053db8b8 Mon Sep 17 00:00:00 2001 From: Bogdanova Olga Date: Fri, 4 Mar 2022 11:23:32 +0300 Subject: [PATCH] issies-681: using http reffer --- .../dashboard/controllers/class.entrycontroller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vanilla/applications/dashboard/controllers/class.entrycontroller.php b/vanilla/applications/dashboard/controllers/class.entrycontroller.php index 05bc72a..8a7f565 100644 --- a/vanilla/applications/dashboard/controllers/class.entrycontroller.php +++ b/vanilla/applications/dashboard/controllers/class.entrycontroller.php @@ -377,9 +377,9 @@ protected function checkOverride($type, $target, $transientKey = null) { $remoteUrl = c("Garden.Embed.RemoteUrl"); // FIX Issues-681: signing from Forum - $forceEmbed = $this->Request->get('Source', '') != 'forum'; - - if($isEmbedded && is_string( $remoteUrl) && $forceEmbed) { + //$forceEmbed = $this->Request->get('Source', '') != 'forum'; + $referer = $_SERVER['HTTP_REFERER']; + if($isEmbedded && is_string( $remoteUrl) && $referer != '' && strpos($referer, $remoteUrl) !== false) { $targetUrl = rawurlencode($remoteUrl.'/#'.url($target)); } else { $targetUrl = rawurlencode(url($target, true));