Skip to content

System info fatal error on symbolic linked folders#13553

Merged
HLeithner merged 9 commits intojoomla:stagingfrom
n3t:staging
Jun 30, 2019
Merged

System info fatal error on symbolic linked folders#13553
HLeithner merged 9 commits intojoomla:stagingfrom
n3t:staging

Conversation

@n3t
Copy link
Copy Markdown
Contributor

@n3t n3t commented Jan 11, 2017

Pull Request for Issue #13552.

Summary of Changes

isDot check first, before isDir

Testing Instructions

Follow the Issue tracker https://issues.joomla.org/tracker/joomla-cms/13552

n3t added 2 commits April 2, 2016 02:58
1/ isDot check is faster than isDir
2/ if main directory is just symlink checking .. could lead to open basedir restriction
@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Feb 17, 2017
This reverts commit 4feff5e.
@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Feb 17, 2017

@n3t it looks like you committed to the wrong branch?

@n3t
Copy link
Copy Markdown
Contributor Author

n3t commented Feb 17, 2017

:-/ yeah, I am not so much familier with github, bit lost now...

@joomla-cms-bot joomla-cms-bot removed the Language Change This is for Translators label Feb 17, 2017
@n3t
Copy link
Copy Markdown
Contributor Author

n3t commented Feb 17, 2017

Ok, now it should be as before, sorry for complications...

@ghost
Copy link
Copy Markdown

ghost commented Feb 18, 2017

@n3t close this Issue?

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Feb 18, 2017

@franz-wohlkoenig no this should be still a valid fix for the issue.

@n3t
Copy link
Copy Markdown
Contributor Author

n3t commented Feb 19, 2017

@franz-wohlkoenig even commits are bit masched up, it still solves the initial issue, and the PR is back in its initial state.

@henkrijneveld
Copy link
Copy Markdown

I have tested this item ✅ successfully on 277b7ae

open basedir message disappears after applying patch


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13553.

@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Mar 31, 2017
@joomla-cms-bot joomla-cms-bot removed the Language Change This is for Translators label May 27, 2017
@ghost
Copy link
Copy Markdown

ghost commented Jul 24, 2018

I couldn't reproduce the issue on Linux-4.17.8-1 with PHP7

@icampus


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13553.

@Schmidie64
Copy link
Copy Markdown
Contributor

I have tested this item 🔴 unsuccessfully on e1d08ad

I followed the instructions step by step but i coundn't reproduce the issue. I think it can be close.

@icampus


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13553.

@roland-d
Copy link
Copy Markdown
Contributor

@n3t Can you please followup on the unsuccessful tests? Thank you.

@csthomas
Copy link
Copy Markdown
Contributor

csthomas commented Jul 24, 2018

IMO negative tests were not carried out with full understanding of the problem.

Example.
Php has access to /var/images, then we want to list directory like

$folder = new DirectoryIterator(JPATH_ROOT . '/images');  // In real, it will be `/var/images`

and now we have a list of elements:

.
..
image1.png
image2.png

when we are in line .., php want to get access to /var/images/.. which is /var and then we get the error because php has access only to /var/images not /var.

This PR is valid. I did code review.

@roland-d
Copy link
Copy Markdown
Contributor

@csthomas Thank you for your input. @Schmidie64 @niklas-deworetzki-thm Please review your testing and check again.

@ghost
Copy link
Copy Markdown

ghost commented Jul 25, 2018

@csthomas oh, now I see the problem here. I'm sorry, I misunderstood at first, that he had problems with accessing the symlinked directory.
But as far as I understand now, the problem is not the symlink. PHP tries to check isDir on .. . This folder is not in baseDir. So PHP fails and shows an error. And this error is 1. unnecessary and 2. shows critical information about the system path to the user.

I'm testing it now, knowing the real issue. Thank you for clarifying it.

@icampus

@ghost
Copy link
Copy Markdown

ghost commented Jul 25, 2018

I have tested this item ✅ successfully on e1d08ad

Tested this ✅ successfully as specified by @csthomas


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13553.

@ghost
Copy link
Copy Markdown

ghost commented Jul 25, 2018

@henkrijneveld can you please retest?

@n3t
Copy link
Copy Markdown
Contributor Author

n3t commented Jul 25, 2018

@csthomas yes your explanation is exact. problem is not symlink itself, but isdir check to dots folders, which don't need to be accessible...

@roland-d
Copy link
Copy Markdown
Contributor

@Schmidie64 Can you please test this again?

@ghost ghost added the J3 Issue label Apr 5, 2019
@ghost ghost removed the J3 Issue label Apr 19, 2019
@HLeithner HLeithner merged commit 4cc4da5 into joomla:staging Jun 30, 2019
@HLeithner
Copy link
Copy Markdown
Member

Thx @n3t, good things need sometime sometimes...

@HLeithner HLeithner added this to the Joomla 3.9.9 milestone Jun 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants