Skip to content

[stable12] {J,CS}SResourceLocator: account for symlinks in app path - #7170

Merged
rullzer merged 1 commit into
nextcloud:stable12from
kyrofa:backport/6028/app_path_realpath
Nov 20, 2017
Merged

[stable12] {J,CS}SResourceLocator: account for symlinks in app path#7170
rullzer merged 1 commit into
nextcloud:stable12from
kyrofa:backport/6028/app_path_realpath

Conversation

@kyrofa

Copy link
Copy Markdown
Member

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.

This PR is a backport of #7061, fixing #6028 for stable12 by using realpath when retrieving app path, which makes these issues go away.

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.
Fixnextcloud#6028
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@kyrofakyrofa changed the title {J,CS}SResourceLocator: account for symlinks in app path[stable12] {J,CS}SResourceLocator: account for symlinks in app pathNov 14, 2017
@MorrisJobkeMorrisJobke added the 3. to review Waiting for reviews label Nov 14, 2017
@MorrisJobkeMorrisJobke added this to the Nextcloud 12.0.4 milestone Nov 14, 2017
@codecov

codecovBot commented Nov 14, 2017

Copy link
Copy Markdown

Codecov Report

Merging #7170 into stable12 will increase coverage by 0.03%.
The diff coverage is 66.66%.

@@ Coverage Diff @@## stable12 #7170 +/- ##
==============================================
+ Coverage 53.76% 53.79% +0.03% - Complexity 22587 22588 +1 
==============================================
Files 1384 1384 Lines 86660 86663 +3 Branches 1329 1329 ==============================================
+ Hits 46593 46621 +28 + Misses 40067 40042 -25
Impacted FilesCoverage ΔComplexity Δ
lib/private/Template/CSSResourceLocator.php0% <0%> (ø)27 <0> (ø)⬇️
lib/private/Template/JSResourceLocator.php50.9% <100%> (+50.9%)23 <0> (+1)⬆️
lib/private/Files/Cache/Propagator.php94.93% <0%> (-1.27%)16% <0%> (ø)
lib/private/Template/ResourceLocator.php66.66% <0%> (+1.85%)20% <0%> (ø)⬇️

@kyrofa

Copy link
Copy Markdown
MemberAuthor

@juliushaertl this review is identical to the one you've already done. Would you mind taking a quick look when you have a moment?

@MorrisJobkeMorrisJobke mentioned this pull request Nov 20, 2017
1 task
@rullzer
rullzer merged commit 6bfeec0 into nextcloud:stable12Nov 20, 2017
@pipiche38

Copy link
Copy Markdown

This issue seems to still be in 12.0.4
Here is an extract of my config file and if the app is stored on the /var/lib/nextcloud/apps directory - and not on the /usr/share/nextcloud/apps - I got the issue
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/share/nextcloud/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/lib/nextcloud/apps',
'url' => '/apps-appstore',
'writable' => true,
),
),

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@kyrofa@pipiche38@rullzer@MorrisJobke