diff --git a/vanilla/applications/dashboard/controllers/class.entrycontroller.php b/vanilla/applications/dashboard/controllers/class.entrycontroller.php index 32da3e8..05bc72a 100644 --- a/vanilla/applications/dashboard/controllers/class.entrycontroller.php +++ b/vanilla/applications/dashboard/controllers/class.entrycontroller.php @@ -375,7 +375,11 @@ protected function checkOverride($type, $target, $transientKey = null) { // FIX: micro-frontends-forums-app issues-12 $isEmbedded = (bool) c('Garden.Embed.Allow',false); $remoteUrl = c("Garden.Embed.RemoteUrl"); - if($isEmbedded && is_string( $remoteUrl)) { + + // FIX Issues-681: signing from Forum + $forceEmbed = $this->Request->get('Source', '') != 'forum'; + + if($isEmbedded && is_string( $remoteUrl) && $forceEmbed) { $targetUrl = rawurlencode($remoteUrl.'/#'.url($target)); } else { $targetUrl = rawurlencode(url($target, true)); diff --git a/vanilla/library/core/functions.render.php b/vanilla/library/core/functions.render.php index 4a7f747..0943f56 100644 --- a/vanilla/library/core/functions.render.php +++ b/vanilla/library/core/functions.render.php @@ -1729,7 +1729,8 @@ function signInUrl($target = '', $force = false) { $target = '' ; } - return '/entry/signin'.($target ? '?Target='.urlencode($target) : ''); + // FIX Issues-681: signing from Forum + return '/entry/signin'.($target ? '?Source=forum&Target='.urlencode($target) : '?Source=forum'); } }