No Code Attached Yet bug
avatar HaJuSi-23
HaJuSi-23
11 Sep 2020

Steps to reproduce the issue

All my images are on one domain, so I work with a symlink on index.php
All other subdomains(3.9) working with this.
Only the 4.0 Beta has got a problem to handle that.
Result is --> "Joomla\CMS\Filesystem\Path::check() - Snooping out of bounds @ /mnt/....../htdocs/ksv23000/images/" and no Images in the list.
screen shot 2020-09-11 at 14 27 53

Expected result

Actual result

System information (as much as possible)

Additional comments

Votes

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

avatar HaJuSi-23 HaJuSi-23 - open - 11 Sep 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Sep 2020
avatar HaJuSi-23
HaJuSi-23 - comment - 12 Sep 2020
Joomla! Version	4.0.0-beta4-dev
PHP Version	7.4.9
Identity	user
Response	200
Template	atum
Database	
ServermysqlVersion5.6.42-logCollationutf8_general_ciConn Collationutf8mb4_general_ci
$_GET
array:2 [ "option" => "com_media" "path" => "local-0:/" ]
$_POST
[]
$_SESSION
array:2 [ "PHPDEBUGBAR_STACK_DATA" => [] "joomla" => "TzoyNDoiSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5Ij...
$_COOKIE
array:3 [ "wf_browser_dir" => "" "554c794a85683f20e9080da206be01cf" => "av7picjj52tsnv0ehigliege...
$_SERVER
array:47 [ "HTTP_HOST" => "www.ligatest.ksv-nesselblatt.de" "REMOTE_ADDR" => "31.18.238.55" "T...
session
array:4 [ "timer" => array:3 [ "start" => 1599887952 "last" => 1599888295 "now" => 159...
registry
array:3 [ "data" => [] "initialized" => false "separator" => "." ]
user
array:20 [ "id" => 290 "name" => "Administrator" "username" => "admin" "email" => "webmaster...
application
array:1 [ "queue" => [] ]

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30616.
avatar ReLater
ReLater - comment - 12 Sep 2020

Whenever you post code or code blocks please surround them with backticks. Then they are easier to read: https://docs.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax#quoting-code

One backtick for inline code.

3
backticks
around
multilne
code

Thank you!


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

avatar ReLater
ReLater - comment - 12 Sep 2020

I don't understand

so I work with a symlink on index.php

Really index.php? Shouldn't it be /images/

avatar ReLater
ReLater - comment - 12 Sep 2020

One of some more related issues (if we talk about /images/): #24959

avatar HaJuSi-23
HaJuSi-23 - comment - 12 Sep 2020

On my Subdomains with cms 3.9.19 this syntax is working
system wide well, on cms 4.0.0-beta4-dev Nightly Builds 12 September 2020 02:01:10 UTC it's not working well!?
"symlink('/mnt/web101/...103/htdocs/ksv23000/images/', '/mnt/web101/...103/htdocs/ligatest/images');"

=========================================================================================================
First test environment
Provider: Strato Server
Server: ???
Operating system: ???
Internet: speed 100Mb/s
Page load-time: 731ms
Browsers: Opera, Firefox, Chrome, Edge
PHP Versions: 7.4.9
SQL Version: 5.6.42
UTF: 8_general_ci
CMS: Nightly Builds 4.0.0.beta4-dev of 12.09.2020 02:01:10 UTC

Second test environment
Provider: localhost xampp
Computer: Intel Core I9-9900K 3.60GHz with 32GB RAM and NVIDIA RTX 2080S
Operating system: Windows 10 Pro 64 Bit
Internet: responce-time <1ms
Page load-time: 407ms
Browsers: Opera, Firefox, Chrome, Edge
PHP Versions: 7.4.4
SQL Version: 10.4.11
UTF: 8_general_ci
CMS: Nightly Builds 4.0.0.beta4-dev of 12.09.2020 02:01:10 UTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30616.
avatar HaJuSi-23
HaJuSi-23 - comment - 12 Sep 2020

By the way, the JCE Filebrowser works well. The Joomla Mediamanger takes no result !?


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

avatar drmenzelit
drmenzelit - comment - 22 Feb 2022

Is this still a problem?

avatar Quy Quy - change - 23 Feb 2022
Labels Added: No Code Attached Yet Information Required
Removed: ?
avatar Quy Quy - labeled - 23 Feb 2022
avatar Quy Quy - change - 7 Apr 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-04-07 01:37:09
Closed_By Quy
avatar Quy Quy - close - 7 Apr 2022
avatar Quy
Quy - comment - 7 Apr 2022

Closing due to no response with additional info.

avatar ReLater
ReLater - comment - 26 May 2022

Is this still a problem?

Yes, it is. Error throwing method Path::check has never been adapted to respect symlinks.

Joomla 4.1.5-dev, Joomla 4.1.4.

No issues with Joomla 3 sites with identical symlinks. Only Joomla 4.

Symlink from Joomla 4 folder:
/www/htdocs/abcd/joomla4/images/

Symlink to /www/htdocs/abcd/images-ghsvs-symlink-target/

Error:
Joomla\CMS\Filesystem\Path::check() - Snooping out of bounds @ /www/htdocs/abcd/images-ghsvs-symlink-target/

avatar ReLater
ReLater - comment - 27 May 2022

Could someone please reopen this issue?

avatar alikon alikon - change - 14 Jun 2022
Status Closed New
Closed_Date 2022-04-07 01:37:09
Closed_By Quy
avatar alikon alikon - reopen - 14 Jun 2022
avatar ReLater
ReLater - comment - 18 Nov 2022

Still an issue with J!4.2.5.

Is it possible to make the title of this issue more meaningful? Something like "[4] Media Manager fails with SymLinks" or so.

Thank you!

avatar ReLater
ReLater - comment - 18 Nov 2022

And could you please remove the Information Required label. Thx again.

avatar Quy Quy - change - 18 Nov 2022
Title
4.0 Media Manager
[4] Media Manager fails with SymLinks
avatar Quy Quy - edited - 18 Nov 2022
avatar Quy Quy - change - 18 Nov 2022
Labels Removed: Information Required
avatar Quy Quy - unlabeled - 18 Nov 2022
avatar Hackwar Hackwar - change - 20 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 20 Feb 2023
avatar source-factory
source-factory - comment - 20 Jun 2023

Still an issue with J!4.3.2

avatar roland-d
roland-d - comment - 24 Aug 2023

This is a real issue whenever you use a symlink for your images folder. In one particular website, a symlink for the images folder is used to link to a NAS where multiple sites use the same storage.

So I looked to see if there is a quick fix related to the symlinks but not that I can see. The particular block in the Path::check function has been in place since at least 28 May 2009.

This was not a problem in Joomla 3 because that function is never called, however the Local Adapter plugin calls it many times. The code is a bit misleading because it calls the function getLocalPath() but all this does is call the Path::check() function.

A quick fix here would be to strip out the Path::check() function and simply return the rootPath and provided path until symlink support is added to the Path::check() function.

avatar toddpage
toddpage - comment - 1 Nov 2023

Would be nice if this was fixed!!!!

avatar toddpage
toddpage - comment - 1 Nov 2023

Modded the following file:

/webdata/joomla/v009/libraries/src/Filesystem/Path.php

Commenteded out the following starting around line #171.

        $path = self::clean($path);
/*
        if ((JPATH_ROOT != '') && strpos($path, self::clean(JPATH_ROOT)) !== 0) {
            throw new \Exception(
                sprintf(
                    '%1$s() - Snooping out of bounds @ %2$s',
                    __METHOD__,
                    self::removeRoot($path)
                )
            );
        }
*/
        return $path;

Seems to have worked but still testing

Add a Comment

Login with GitHub to post a comment