Skip to content

Commit bf3c490

Browse files
committed
issies-681: using http reffer
1 parent ef16b0b commit bf3c490

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vanilla/applications/dashboard/controllers/class.entrycontroller.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,9 @@ protected function checkOverride($type, $target, $transientKey = null) {
377377
$remoteUrl = c("Garden.Embed.RemoteUrl");
378378

379379
// FIX Issues-681: signing from Forum
380-
$forceEmbed = $this->Request->get('Source', '') != 'forum';
381-
382-
if($isEmbedded && is_string( $remoteUrl) && $forceEmbed) {
380+
//$forceEmbed = $this->Request->get('Source', '') != 'forum';
381+
$referer = $_SERVER['HTTP_REFERER'];
382+
if($isEmbedded && is_string( $remoteUrl) && $referer != '' && strpos($referer, $remoteUrl) !== false) {
383383
$targetUrl = rawurlencode($remoteUrl.'/#'.url($target));
384384
} else {
385385
$targetUrl = rawurlencode(url($target, true));

0 commit comments

Comments
 (0)