? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
17 Sep 2014

This PR adds a class_exists() sanity check to JHttpFactory::getAvailableDriver() before trying to blindly call a class that may not be present in the filesystem in order to prevent a PHP Fatal Error.

avatar mbabker mbabker - open - 17 Sep 2014
avatar jissues-bot jissues-bot - change - 17 Sep 2014
Labels Added: ?
avatar wilsonge
wilsonge - comment - 22 Sep 2014

@test works as expected

avatar b2z
b2z - comment - 24 Sep 2014

@wilsonge how did you test it?

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar mbabker
mbabker - comment - 24 Sep 2014

Personally, I think the unit tests are enough, but I'm biased :wink:

In your code, you can add this call: JHttpFactory::getHttp(new \Joomla\Registry\Registry, array('fopen'));

That will try to create a JHttpTransportFopen object, which doesn't exist.

avatar b2z
b2z - comment - 24 Sep 2014

@test ok ;)

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar b2z b2z - test_item - 24 Sep 2014 - Tested successfully
avatar b2z
b2z - comment - 24 Sep 2014

@wilsonge why you do not submit your test results?

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar betweenbrain
betweenbrain - comment - 25 Sep 2014

@test

Before applying the diff, I tested by changing /plugins/twofactorauth/yubikey/yubikey.php#293 to $http = JHttpFactory::getHttp(new \Joomla\Registry\Registry, array('fopen')); which resulted in Fatal error: Class 'JHttpTransportFopen' not found when trying to log in the frontend with a Yubikey.

After applying the diff, the frontend login does not succeed (as expected as the code is wrong) and the page reloads and displays the error page with a message of 'No transport driver available.'

This seems like a successful test to me.

download.

avatar b2z
b2z - comment - 25 Sep 2014

@betweenbrain you also do not use submit test feature? Shame on you :toungue:

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar betweenbrain
betweenbrain - comment - 25 Sep 2014

@b2z Sorry! I'm just used to clicking the "view it on Github" link. I'll try harder next time.

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar zero-24 zero-24 - alter_testresult - 26 Sep 2014 - wilsonge: Tested successfully
avatar zero-24 zero-24 - change - 26 Sep 2014
Category Libraries Unit Tests
avatar zero-24 zero-24 - change - 26 Sep 2014
Status Pending Ready to Commit
avatar zero-24 zero-24 - alter_testresult - 26 Sep 2014 - betweenbrain: Tested successfully
avatar zero-24
zero-24 - comment - 28 Sep 2014

RTC

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar infograf768 infograf768 - change - 29 Sep 2014
Labels Added: ?
avatar phproberto
phproberto - comment - 2 Oct 2014

Merged into 3.4-dev branch bee7296

Thanks!!

avatar phproberto phproberto - close - 2 Oct 2014
avatar phproberto phproberto - change - 2 Oct 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-10-02 00:45:47
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment