mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Avoid caching when the url contains links, avoids problems with eg: /apps/InfoLog/Open/2021
This commit is contained in:
parent
6cd3e63bdc
commit
fe79fe390f
@ -307,7 +307,21 @@ class Base
|
||||
}
|
||||
$url = $replace;
|
||||
}
|
||||
if ($replace_user_pass_host) self::$resolve_url_cache[$path] = ['url' => $url, 'mounted' => $mounted];
|
||||
|
||||
// Make sure we don't cache anything with a link anywhere in the url, since it fails with eg: /apps/InfoLog/Open$/2021$.
|
||||
// is_link() is not always right here
|
||||
$is_link = is_link($url) || (self::symlinkCache_resolve(Vfs::parse_url($url,PHP_URL_PATH)) !== $url);
|
||||
if($is_link)
|
||||
{
|
||||
$old_url = $url;
|
||||
$_url = self::symlinkCache_resolve(Vfs::parse_url($url,PHP_URL_PATH));
|
||||
$url = @readlink($url) ?: ($_url != $parts['path'] ? str_replace($parts['path'],$_url,$url) : null) ?:$url;
|
||||
$is_link = $old_url == $url;
|
||||
}
|
||||
if ($replace_user_pass_host && !$is_link)
|
||||
{
|
||||
self::$resolve_url_cache[$path] = ['url' => $url, 'mounted' => $mounted];
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user