ycom icon indicating copy to clipboard operation
ycom copied to clipboard

Redirect nach Login in Unterordner Installation fehlerhaft

Open godsdog opened this issue 4 years ago • 1 comments

In einer Unterordner Installation wird der Unterordner doppelt in die URL gehängt. yCom 4.0.3 und Redaxo 5.12.0

Hab es mal Quick and Dirty für mich gefixt: In: /ycom/plugins/auth/lib/ycom_auth.php Ab Zeile 510: Vorher:

if (!preg_match('/http(s?)\:\/\//i', $returnTo)) {
$returnTo = rex_yrewrite::getFullPath(('/' == substr($returnTo, 0, 1) ? substr($returnTo, 1) : $returnTo));
}

Nachher:

if (!preg_match('/http(s?)\:\/\//i', $returnTo)) {
$frontendUrl = rex_url::frontend();
if (strpos($returnTo, $frontendUrl) !== false) {
$returnTo = str_replace($frontendUrl, '/', $returnTo);
}
$returnTo = rex_yrewrite::getFullPath(('/' == substr($returnTo, 0, 1) ? substr($returnTo, 1) : $returnTo));
}

godsdog avatar Mar 16 '21 16:03 godsdog

LGTM 👍 Habe das lokal mit Unterorder und produktiv ohne Unterordner getestet und passt. Jetzt funktioniert der Redirect auch lokal. Habe allerdings nicht näher untersucht :)

aeberhard avatar Mar 23 '21 23:03 aeberhard

Vielen Dank - ist übernommen

dergel avatar Sep 27 '22 13:09 dergel