Skip to content

Commit

Permalink
Fixing big security issue in render_file that allows accessing any fi…
Browse files Browse the repository at this point in the history
…les from outside public folder using ../

Improved security behaviour will be added later (with a safe_dir option). [#35 state:resolved]
  • Loading branch information
Fabrice Luraine committed Nov 30, 2009
1 parent dbe688d commit c99be76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/limonade.php
Expand Up @@ -1468,6 +1468,7 @@ function render_file($filename, $return = false)
// {
//
// }
$filename = str_replace('../', '', $filename);
if(file_exists($filename))
{
$content_type = mime_type(file_extension($filename));
Expand Down

0 comments on commit c99be76

Please sign in to comment.