Skip to content

Conversation

@kyrofa
Copy link
Member

@kyrofa kyrofa commented Nov 14, 2017

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.

Fix nextcloud#6028

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@kyrofa kyrofa changed the title {J,CS}SResourceLocator: account for symlinks in app path [stable12] {J,CS}SResourceLocator: account for symlinks in app path Nov 14, 2017
@MorrisJobke MorrisJobke added the 3. to review Waiting for reviews label Nov 14, 2017
@MorrisJobke MorrisJobke added this to the Nextcloud 12.0.4 milestone Nov 14, 2017
@codecov
Copy link

codecov bot commented Nov 14, 2017

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 Files Coverage Δ Complexity Δ
lib/private/Template/CSSResourceLocator.php 0% <0%> (ø) 27 <0> (ø) ⬇️
lib/private/Template/JSResourceLocator.php 50.9% <100%> (+50.9%) 23 <0> (+1) ⬆️
lib/private/Files/Cache/Propagator.php 94.93% <0%> (-1.27%) 16% <0%> (ø)
lib/private/Template/ResourceLocator.php 66.66% <0%> (+1.85%) 20% <0%> (ø) ⬇️

@kyrofa
Copy link
Member Author

kyrofa commented Nov 17, 2017

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

@MorrisJobke MorrisJobke mentioned this pull request Nov 20, 2017
1 task
@rullzer rullzer merged commit 6bfeec0 into nextcloud:stable12 Nov 20, 2017
@pipiche38
Copy link

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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants