Skip to content
Permalink
Browse files

bugfix for redirect $target #1086

  • Loading branch information...
teiling88 committed Aug 28, 2017
1 parent 0327b04 commit ed4f18bdc567a55652bef343f975d93c7ac061eb
Showing with 8 additions and 1 deletion.
  1. +8 −1 htdocs/login.php
@@ -22,7 +22,14 @@
$tpl->assign('error', LOGIN_OK);
$target = isset($_REQUEST['target']) ? $_REQUEST['target'] : 'myhome.php';
if (mb_strtolower(mb_substr($target, 0, 9)) == 'login.php') {
// #1086 important change don't delete it :-)
$path = parse_url($target, PHP_URL_PATH);
if ((($path && !file_exists(__DIR__ . '/' . $path)) || !$path) && strpos($target, 'okapi/apps/') !== 0) {
$target = 'myhome.php';
}
if (mb_strtolower(mb_substr($target, 0, 9)) === 'login.php') {
$target = 'myhome.php';
}

0 comments on commit ed4f18b

Please sign in to comment.
You can’t perform that action at this time.