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

Wrong use of make_path_relative

    XMLWordPrintable

Details

    Description

      make_path_relative should receive only absolute paths.

      Under some circunstances is receiving relative paths, that cause an exception in symfony 4.4

      <b>Fatal error</b>:  Uncaught Symfony\Component\Filesystem\Exception\InvalidArgumentException: The start path &quot;./../images/avatars/upload/&quot; is not absolute. in /home/travis/build/rubencm/phpbb/phpBB/vendor/symfony/filesystem/Filesystem.php:444\n
       
      Stack trace:\n
       
      #0 /home/travis/build/rubencm/phpbb/phpBB/phpbb/filesystem/helper.php(215): Symfony\Component\Filesystem\Filesystem-&gt;makePathRelative('./../images/ava...', './../images/ava...')\n
       
      #1 /home/travis/build/rubencm/phpbb/phpBB/phpbb/storage/adapter/local.php(234): phpbb\filesystem\helper::make_path_relative('./../images/ava...', './../images/ava...')\n
       
      #2 /home/travis/build/rubencm/phpbb/phpBB/phpbb/storage/adapter/local.php(322): phpbb\storage\adapter\local-&gt;ensure_directory_exists('./../images/ava...')\n
       
      #3 /home/travis/build/rubencm/phpbb/phpBB/phpbb/storage/storage.php(284): phpbb\storage\adapter\local-&gt;write_stream('ca90f46af82b289...', Resource id #113)\n
       
      #4 /home/travis/build/rubencm/phpbb/phpBB/phpbb/files/filespec_storage.php(449): phpbb\storage\storage-&gt;write_stream('ca90f46af82b2 in <b>/home/travis/build/rubencm/phpbb/phpBB/vendor/symfony/filesystem/Filesystem.php</b> on line <b>444</b><br />
      

       

      Attachments

        Activity

          People

            rubencm rubencm
            rubencm rubencm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: