Skip to content
Snippets Groups Projects
  1. Jan 14, 2013
  2. Jan 13, 2013
    • Lukas Reschke's avatar
      Commentblocks should begin with two * · b7db967d
      Lukas Reschke authored
      b7db967d
    • Lukas Reschke's avatar
      Add @brief to description · c27833b1
      Lukas Reschke authored
      c27833b1
    • Lukas Reschke's avatar
      Simplify the isSubDirectory() function · e151210a
      Lukas Reschke authored
      isSubDirectory() checks if a specified $sub is a subdirectory of the
      $parent, this is needed to prevent file inclusions.
      
      Actually, the current code is more kind of a "hack" which I always
      struggle over if browsing through source. So this should be a much
      better implementation.
      
      The implementation is really straightforward:
      - [realpath()](http://php.net/manual/function.realpath.php) expands all
      symbolic links and resolves references to '/./', '/../' and extra '/'
      characters in the input path and return the canonicalized absolute
      pathname.
      - [strpos()](php.net/manual/function.strpos.php) returns FALSE if the
      substring wasn't found.
      
      Since this is an absolutely critical piece of code, I'd like to ensure
      that this is absolutely safe!
      e151210a
  3. Jan 12, 2013
  4. Jan 11, 2013
  5. Jan 10, 2013
Loading