blob: b6355b0d7f21a7d5d46eebff5b97e2871efc9e14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
From b0d296639cfc5d0460987787cc9869c5e5473d85 Mon Sep 17 00:00:00 2001
From: Kyle Fazzari <kyrofa@ubuntu.com>
Date: Fri, 3 Nov 2017 23:03:34 -0700
Subject: [PATCH] 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>
---
lib/private/Template/CSSResourceLocator.php | 5 +++++
1 file changed, 5 insertions(+)
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 @@ public function doFind($style) {
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);
}
|