? ? Pending

User tests: Successful: Unsuccessful:

avatar rvalitov
rvalitov
2 May 2018

Improved fix for pull request #17349 .

Summary of Changes

If the open_basedir ini directive contains a path that links to a
symlink, PHP will resolve these paths and then perform the acutal
access check.

Joomla, however, only performed a plain string comparison. As a
result leading to false positives.

Testing Instructions

  • Create directory: ~/a/public_html
  • Create symlink: ~/b/ pointing to ~/a/
  • Configure PHP's openbasedir to contain ~/b/public_html
  • Have Joomla create a folder inside ~/a/public_html

Expected result

This should just work with no erorrs whatsoever.

Actual result

An error is presented that the path is not within open_basedir..

Documentation Changes Required

No

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar rvalitov rvalitov - open - 2 May 2018
avatar rvalitov rvalitov - change - 2 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 May 2018
Category Libraries External Library Composer Change
avatar rvalitov
rvalitov - comment - 2 May 2018

The discussion is here #17349. Also I think this pull request will fix #13214

avatar Quy Quy - change - 2 May 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-05-02 13:58:55
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 2 May 2018
Closed_Date 2018-05-02 13:58:55 2018-05-02 13:58:57
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 2 May 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 2 May 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/20280

avatar Quy
Quy - comment - 2 May 2018

Closing as duplicate of #17349 with the revert. @rvalitov please submit PR to the other repo as advised.


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

avatar roland-d
roland-d - comment - 2 May 2018

@Quy There is no code in issue #13214 so how can it contain the revert?

avatar mbabker mbabker - change - 2 May 2018
Status Closed New
Closed_Date 2018-05-02 13:58:57
Closed_By joomla-cms-bot
Labels Added: ? ?
avatar mbabker mbabker - change - 2 May 2018
Status New Pending
avatar mbabker mbabker - reopen - 2 May 2018
avatar roland-d
roland-d - comment - 2 May 2018

@rvalitov If you need help making a PR against the framework, let me know.

avatar Quy
Quy - comment - 2 May 2018

@roland-d When you revert the change in libraries/vendor/joomla/filesystem/src/Folder.php in this PR then it will be a duplicate of the original PR.

avatar roland-d
roland-d - comment - 2 May 2018

@Quy A ok, then I think you mentioned the wrong PR because the one you linked has no code :) I see your point.

avatar roland-d
roland-d - comment - 2 May 2018

I have tested this item successfully on 657869e

Before the patch:

Unable to create a folder in Media Manager
Unable to install an extension via upload
Unable to install an extension via Install from web
Unable to update extensions

After the patch:

Able to create a folder in Media Manager
Able to install an extension
Able to install an extension via Install from web
Able to update extensions

This includes the framework fix.


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

avatar roland-d roland-d - test_item - 2 May 2018 - Tested successfully
avatar Quy
Quy - comment - 2 May 2018

@roland-d You're right. I updated my comment to point to the right PR. Thanks.

avatar rvalitov
rvalitov - comment - 2 May 2018

Thank you, I will make a pull request to the framework

avatar rvalitov
rvalitov - comment - 2 May 2018

Done, the correct PR is joomla-framework/filesystem#20

avatar rvalitov
rvalitov - comment - 2 May 2018

I have tested this item successfully on 657869e


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

avatar rvalitov rvalitov - test_item - 2 May 2018 - Tested successfully
avatar Quy Quy - change - 2 May 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 2 May 2018

RTC


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

avatar rvalitov
rvalitov - comment - 2 May 2018

@Quy Should I still revert the modification of vendor/joomla files in this PR?

avatar Quy
Quy - comment - 2 May 2018

Yes, please.

avatar rvalitov rvalitov - change - 2 May 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 May 2018
Category Libraries External Library Composer Change Libraries
avatar rvalitov
rvalitov - comment - 2 May 2018

Done, reverted

avatar peteruoi
peteruoi - comment - 2 May 2018

@Quy i think 2nd test can't be counted cause the tester is the creator of pr :)

avatar Quy
Quy - comment - 2 May 2018

This PR is a duplicate of #17349 which was originally created by @Freeaqingme. Therefore, @rvalitov is not the creator, thus, his test is a valid count.

avatar peteruoi
peteruoi - comment - 2 May 2018

Sorry for pinging then :)

avatar Quy
Quy - comment - 2 May 2018

@peteruoi No problem. Thanks for checking.

avatar mbabker mbabker - change - 5 May 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-05-05 20:15:57
Closed_By mbabker
Labels Removed: ?
avatar mbabker mbabker - close - 5 May 2018
avatar mbabker mbabker - merge - 5 May 2018

Add a Comment

Login with GitHub to post a comment