Sujet fermé
Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5

Dirty fix for ImageManager
#4

For your information.

Here is my complete validRelativePath method. Which solve the problem on my 1.11.3 install

Code :
    function validRelativePath($path)
    {
        $dirs = $this->getDirs();
        if($path == '/')
            Return true;
        //check the path given in the url against the
        //list of paths in the system.
        for($i = 0; $i < count($dirs); $i++)
        {
            $key = key($dirs);
            //we found the path
            if($key == $path || $key == $path."/")
                Return true;

            next($dirs);
        }
        Return false;
    }

The condition if($path == '/') is only for the root folder management. The code below this instruction manage all subfolders.

Regards,
Sujet fermé


Messages dans ce sujet

Atteindre :


Utilisateur(s) parcourant ce sujet : 2 visiteur(s)