Skip to content

Commit

Permalink
Update 46-code_example--RFD_and_file_download_injection_prevention--.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RiieCco committed Jun 12, 2015
1 parent 33f1aa9 commit 95cd7bf
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
header("Pragma: no-cache");
header('Content-Length: ' . filesize($filename));
readfile($filename);
/*
Exit is very important, if other mechanims fail this makes sure the rest
of the page plus attack string does not get downloaded anyways.
*/
exit;
}
}
}
Expand All @@ -83,6 +88,11 @@
header("Pragma: no-cache");
header('Content-Length: ' . filesize($filename));
readfile($filename);
/*
Exit is very important, if other mechanims fail this makes sure the rest
of the page plus attack string does not get downloaded anyways.
*/
exit;
}
}
}
Expand Down

0 comments on commit 95cd7bf

Please sign in to comment.