summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKyle Fazzari <kyrofa@ubuntu.com>2017-11-03 23:03:34 -0700
committerKyle Fazzari <kyrofa@ubuntu.com>2017-11-03 23:52:09 -0700
commitb0d296639cfc5d0460987787cc9869c5e5473d85 (patch)
treeb1c501c199684a8d6c06083dd7a97295fe116240 /lib
parent6fd99b4e47ff82b9433f781cb91876db4fe4fafd (diff)
downloadnextcloud-server-b0d296639cfc5d0460987787cc9869c5e5473d85.tar.gz
nextcloud-server-b0d296639cfc5d0460987787cc9869c5e5473d85.zip
CSSResourceLocator: account for symlinks in app path
Currently, if the app path includes a symlink, the calculated webDir will be incorrect when generating CSS and URLs will be pointing to the wrong place, breaking CSS. Use realpath when retrieving app path, and these issues go away. Fix #6028 Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Template/CSSResourceLocator.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php
index 1028f31a5ea..bd5b9a34477 100644
--- a/lib/private/Template/CSSResourceLocator.php
+++ b/lib/private/Template/CSSResourceLocator.php
@@ -71,6 +71,11 @@ class CSSResourceLocator extends ResourceLocator {
return;
}
+ // Account for the possibility of having symlinks in app path. Doing
+ // this here instead of above as an empty argument to realpath gets
+ // turned into cwd.
+ $app_path = realpath($app_path);
+
if(!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) {
$this->append($app_path, $style.'.css', $app_url);
}