? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
29 Jul 2017

Summary of Changes

Through JHtml::_(), it is possible to access internal methods of the JHtml class that are not public API. This PR changes the logic to detect if a non-public method of JHtml is being called and will disallow these methods to be called going forward.

Testing Instructions

Make a call to JHtml::_('extract', 'date.relative') and you'll find that the protected JHtml::extract() method is executed and the results returned to the caller without the patch applied. With the patch, an exception is now thrown.

Expected result

No access to internal class methods.

Actual result

Internal class methods can be accessed.

Documentation Changes Required

Technically this is a B/C break and should be noted as devs could conceivably call and use one of the protected methods of JHtml right now, hence the reason I'm doing this against 4.0 instead of 3.x.

avatar joomla-cms-bot joomla-cms-bot - change - 29 Jul 2017
Category Libraries
avatar mbabker mbabker - open - 29 Jul 2017
avatar mbabker mbabker - change - 29 Jul 2017
Status New Pending
avatar zero-24 zero-24 - test_item - 29 Jul 2017 - Tested successfully
avatar zero-24
zero-24 - comment - 29 Jul 2017

I have tested this item successfully on f11c95e

Looks good to me. Thanks!


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

avatar wilsonge wilsonge - change - 30 Jul 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-07-30 22:40:13
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 30 Jul 2017
avatar wilsonge wilsonge - merge - 30 Jul 2017

Add a Comment

Login with GitHub to post a comment