Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10407

Incorrect check for empty image file paths during conversion

XMLWordPrintable

      Reported by nicon` in IRC
      This applies to avatar_path, avatar_gallery_path, smilies_path, and attachments upload_path.

      Using avatar_gallery_path as an example:
      In convert_phpbb20.php [309], 'avatar_gallery_path' => get_config_value('avatar_gallery_path') . '/',
      In functions_convert.php [427], if (empty($convert->convertor['avatar_gallery_path'])
      avatar_gallery_path will never be empty because of the added trailing slash. phpBB will then attempt to copy all the directories in the phpBB structure resulting in an error message similar to:

      Fatal installation error

      functions_convert.php [ 2429 ]

      Please make sure that these folders exist and are writable by the webserver then try again:
      »./../images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars
      [...]
      /phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/phpBB3/images/avatars/gallery/install/sf_tpl_files

      and the error messages continue on.

      Proposed fix concept:
      OPEN functions_convert.php
      FIND
      if (empty($convert->convertor['avatar_gallery_path'])
      REPLACE WITH
      $agp = get_config_value('avatar_gallery_path');
      if (empty($agp))

      I have a patch in the works.

            bantu Andreas Fischer [X] (Inactive)
            D¡cky Richard Foote [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: