? Success
Referenced as Related to: # 4317

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
17 Oct 2014

This is a recommit of #4317 which was meshed up!

Scope

Reaveal a trimmed path on an error message produced in /libraries/loader.php instead of the actual real path

B/C

None

Tests

Try renaming a library, so its unavailable. Loader will come up with an error 500 and the message
Library path /Applications/Mamp…. cannot be found. which is too liberal.
Apply the patch and re run
message should be Library path /libraries/... cannot be found.

avatar dgt41 dgt41 - open - 17 Oct 2014
avatar jissues-bot jissues-bot - change - 17 Oct 2014
Labels Added: ?
avatar jissues-bot jissues-bot - change - 17 Oct 2014
Title
Re commit of #4317
Don't reveal the real path on error msg
avatar zero-24 zero-24 - change - 17 Oct 2014
Category Code style Libraries
avatar zero-24 zero-24 - change - 17 Oct 2014
The description was changed
Title
Re commit of #4317
Don't reveal the real path on error msg
avatar zero-24
zero-24 - comment - 17 Oct 2014

@dgt41 I have sync the description and title here.

avatar allanlhansen allanlhansen - test_item - 17 Oct 2014 - Tested successfully
avatar allanlhansen allanlhansen - test_item - 17 Oct 2014 - Tested successfully
avatar brianteeman brianteeman - test_item - 18 Oct 2014 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 18 Oct 2014

@test removed the newsfeed library and loaded the newsfeed component and observed the error

Fatal error: Class 'JFeed' not found in /Applications/MAMP/htdocs/Joomla_3.3.6-Stable-Full_Package/libraries/joomla/feed/parser.php on line 66

Applied patch

Fatal error: Class 'JFeed' not found in /Applications/MAMP/htdocs/Joomla_3.3.6-Stable-Full_Package/libraries/joomla/feed/parser.php on line 66

So no change

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

avatar dgt41
dgt41 - comment - 18 Oct 2014

@brianteeman I think you used my first instructions for testing, which obviously were wrong. Actually all you have to do is:

In Protostar's index.php after defined('_JEXEC') or die; add this code (one line at a time):

JLoader::registerPrefix('XY', JPATH_PLATFORM . '/notfound');

and

JLoader::registerNamespace('XYZ', JPATH_LIBRARIES . '/notagain');
avatar brianteeman
brianteeman - comment - 18 Oct 2014

Yes I did as there is a sync issue with the original post on github and jissues

However that would not make any difference to my test. My test produced the error message that you are trying to prevent.

avatar dgt41
dgt41 - comment - 18 Oct 2014

@brianteeman Actually loader.php has a handful of methods and just removing a folder doesn’t really assures that the 2 methods where the changes made are gonna get called. This PR will not fix universally this, it touches only the 2 methods I just comment about few comments above. Thus your testing truthfully gives other msg because most probably another method was called. You have to make sure that registerPrefix and registerNamespace are called, so it’s better to use the instructions in this page. Sorry for the confusion here.

avatar dgt41
dgt41 - comment - 18 Oct 2014

@brianteeman here are my results:
screenshot 2014-10-18 16 46 54
screenshot 2014-10-18 16 47 54

avatar roland-d
roland-d - comment - 14 Nov 2014

@brianteeman The error message you get is a PHP error message, the one we are modifying here is a Joomla error message. I don't think we have control over the PHP error message.
@test All good. After applying the patch, the path is no longer shown.

avatar roland-d roland-d - test_item - 14 Nov 2014 - Tested successfully
avatar roland-d roland-d - change - 14 Nov 2014
Status Pending Ready to Commit
avatar roland-d
roland-d - comment - 14 Nov 2014

Moving to RTC as we have 2 successful tests.

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

avatar infograf768 infograf768 - change - 15 Nov 2014
Milestone Added:
avatar infograf768
infograf768 - comment - 15 Nov 2014

OK here. Merging.

avatar infograf768 infograf768 - reference | 069de6c - 15 Nov 14
avatar infograf768 infograf768 - merge - 15 Nov 2014
avatar infograf768 infograf768 - close - 15 Nov 2014
avatar infograf768 infograf768 - close - 15 Nov 2014
avatar infograf768 infograf768 - change - 15 Nov 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-11-15 07:36:42
avatar dgt41 dgt41 - head_ref_deleted - 15 Nov 2014

Add a Comment

Login with GitHub to post a comment