Les avertissements suivants se sont produits :
Warning [2] Undefined array key 0 - Line: 1640 - File: showthread.php PHP 8.2.18 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 1640 errorHandler->error_callback
/showthread.php 915 buildtree




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,


Messages dans ce sujet

Atteindre :


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