Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-12009

Incorrectly installed extensions should be ignored

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-a1
    • Fix Version/s: 3.1.0-a3
    • Component/s: Extensions
    • Labels:
      None

      Description

      The Extension Manager should ignore extensions that are uploaded in a manner that does not conform to the expected folder tree structure.

      Now that Extension development has gone public, there is a big problem waiting for us because of the way we install extensions, now that people will start downloading extensions in development and trying to install them.

      We have a very specific set of rules for how the folder tree must be set up when installing an extension, i.e.: phpBB/ext/vendor/foobar/

      If an extension is put in the /ext/ folder in a way that does not conform to the requirements, (i.e.: phpBB/ext/vendor/foobar/my-github-foo-bar-branch-master/) it is still seen by the Extension Manager and presented to the user, and the user can even Enable it!

      Of course, enabling it leads to a fatal error, because the user did not upload the contents to the right folder structure.

      I propose that the Extension Manager should not look deeper than /ext/vendor/foobar/ for the composer.json file, and it should verify that vendor/foobar directory name structure is a match with the "name" parameter in composer.json. If these verifications are not met, the Extension is not shown in the ACP extension page, preventing users from trying to enable it and forcing them to realize that they may have installed/uploaded it wrong.

        Issue Links

          Activity

          Hide
          VSE Matt Friedman added a comment -

          Also just found another issue after trying to enable an extension that was uploaded in an incorrect folder structure, and getting the blank error page:

          If you go back and correct the folder names, and return to the ACP, you see the extension ready for enabling as you'd expect, but also the "remains" of the failed attempt are left behind in the ACP extensions page list, because the attempt was stored in the extensions db table:

          The “vse/ie6nomore/IE6NoMore-for-phpBB-extension” extension is not valid.
          The required file does not exist: ./../ext/vse/ie6nomore/IE6NoMore-for-phpBB-extension/composer.json

          This can never go away either, because you can not ever Disable the incorrectly installed extension after the failed enable attempt.

          This is just another reason why the extension manager MUST NOT be allowed to recognize or Enable extensions that do conform to their composer.json "name" parameter in their folder trees.

          Show
          VSE Matt Friedman added a comment - Also just found another issue after trying to enable an extension that was uploaded in an incorrect folder structure, and getting the blank error page: If you go back and correct the folder names, and return to the ACP, you see the extension ready for enabling as you'd expect, but also the "remains" of the failed attempt are left behind in the ACP extensions page list, because the attempt was stored in the extensions db table: The “vse/ie6nomore/IE6NoMore-for-phpBB-extension” extension is not valid. The required file does not exist: ./../ext/vse/ie6nomore/IE6NoMore-for-phpBB-extension/composer.json This can never go away either, because you can not ever Disable the incorrectly installed extension after the failed enable attempt. This is just another reason why the extension manager MUST NOT be allowed to recognize or Enable extensions that do conform to their composer.json "name" parameter in their folder trees.
          Hide
          VSE Matt Friedman added a comment -

          As I expected, people installing extensions without adhering to the strict folder naming/structure are already coming in:
          https://www.phpbb.com/community/viewtopic.php?f=456&t=2209781#p13449431

          Show
          VSE Matt Friedman added a comment - As I expected, people installing extensions without adhering to the strict folder naming/structure are already coming in: https://www.phpbb.com/community/viewtopic.php?f=456&t=2209781#p13449431

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              VSE Matt Friedman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development