Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Error Handling in InstallerModelInstall::install() #29414

Open
mbabker opened this issue Jun 4, 2020 · 1 comment
Open

Bad Error Handling in InstallerModelInstall::install() #29414

mbabker opened this issue Jun 4, 2020 · 1 comment

Comments

@mbabker
Copy link
Contributor

mbabker commented Jun 4, 2020

Steps to reproduce the issue

Trigger an error while uploading an extension that results in $package not being an array (setting a small upload file size should do the trick).

Expected result

Uninstall is aborted gracefully in error conditions.

Actual result

Uninstall is aborted with a PHP Notice (which depending on the day of the week may qualify as a FPD security issue): Trying to access array offset on value of type bool in administrator/components/com_installer/models/install.php on line 178.

System information (as much as possible)

Joomla 3.9.19, PHP 7.4, all other information irrelevant

Additional comments

The line triggering the notice should only be triggered when $package is an array, as the requisite data is not available when $package is of any other data type (this would be a great use case for a DTO defining the list of allowed properties and an object|null type on the $package, but I won't push my luck here 😉 ).

@SharkyKZ
Copy link
Contributor

SharkyKZ commented Jun 4, 2020

See PR #29416 for notice issue.

@Hackwar Hackwar added the bug label Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants