1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/12787] Remove one app.php when it's both in $path and $web_root_path

PHPBB3-12787
This commit is contained in:
Tristan Darricau
2014-07-05 14:01:14 +02:00
parent bc47e719b1
commit 7399f29df8

View File

@@ -104,7 +104,13 @@ class path_helper
{
$path = substr($path, strlen($this->phpbb_root_path));
return $this->filesystem->clean_path($this->get_web_root_path() . $path);
$web_root_path = $this->get_web_root_path();
if (substr($web_root_path, -8) === 'app.php/' && substr($path, 0, 7) === 'app.php')
{
$path = substr($path, 8);
}
return $this->filesystem->clean_path($web_root_path . $path);
}
return $path;