bug PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
25 Sep 2023

Pull Request for Issue #41907.

Summary of Changes

The installer should stop when package information was not found.

Testing Instructions

Please follow #41907

Actual result BEFORE applying this Pull Request

A PHP error, + Joomla error "Please enter a valid URL"

Expected result AFTER applying this Pull Request

No PHP error, only Joomla error "Please enter a valid URL"

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed
avatar joomla-cms-bot joomla-cms-bot - change - 25 Sep 2023
Category Administration com_installer
avatar Fedik Fedik - open - 25 Sep 2023
avatar Fedik Fedik - change - 25 Sep 2023
Status New Pending
avatar wilsonge
wilsonge - comment - 25 Sep 2023

This feels weird. We are already trying to set defaults when package is null. How do we end up in a situation where it's false?

avatar Fedik
Fedik - comment - 25 Sep 2023

One of following can easily create a false result

// Did you give us a URL?
if (!$url) {
Factory::getApplication()->enqueueMessage(Text::_('COM_INSTALLER_MSG_INSTALL_ENTER_A_URL'), 'error');
return false;
}
// We only allow http & https here
$uri = new Uri($url);
if (!in_array($uri->getScheme(), ['http', 'https'])) {
Factory::getApplication()->enqueueMessage(Text::_('COM_INSTALLER_MSG_INSTALL_INVALID_URL_SCHEME'), 'error');
return false;
}

Similar applies to _getPackageFromFolder() and _getPackageFromUpload() methods.

avatar HLeithner HLeithner - change - 25 Sep 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-25 10:04:34
Closed_By HLeithner
Labels Added: bug PR-5.0-dev
avatar HLeithner HLeithner - close - 25 Sep 2023
avatar HLeithner HLeithner - merge - 25 Sep 2023
avatar HLeithner
HLeithner - comment - 25 Sep 2023

thanks

Add a Comment

Login with GitHub to post a comment