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

'Permission' migration tool incorrectly handles role removal

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.3.5
    • 3.3.6-RC1
    • Migrations
    • None

    Description

      public function role_remove($role_name) in \phpbb\db\migration\tool\permission.php doesn't correctly handle role removal like does the function remove_role($role_id, $permission_type) in \includes\acp\acp_permission_roles.php.

      In particular, it misses unsetting related permissions and group/user role removals. This may lead to cases when groups/users have non-existant roles assigned and to some errors during installation of extensions, like 

      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/migration/tool/permission.php on line 428: Trying to access array offset on value of type bool
      [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/migration/tool/permission.php on line 429: Trying to access array offset on value of type bool

      Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors. The permission role "" unexpectedly does not exist.

       

      Attachments

        Issue Links

          Activity

            People

              Marc Marc
              rxu rxu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: