Added < and > to blocked characters

This commit is contained in:
Jaidyn Lev 2018-11-10 13:59:04 -06:00
parent 397063fcad
commit 167012a2f6

View File

@ -5,7 +5,7 @@
// Sanitize a filename by replacing common suspicious characters with "_". // Sanitize a filename by replacing common suspicious characters with "_".
function sanitize_filename($filename) function sanitize_filename($filename)
{ {
$death_characters = array(" ", ",", "/", "\\", "%", "$", "^"); $death_characters = array(" ", ",", "<", ">", "/", "\\", "%", "$", "^");
$death_filetypes = array(".php", ".sh", ".lisp", ".cl", ".cgi", ".pl"); $death_filetypes = array(".php", ".sh", ".lisp", ".cl", ".cgi", ".pl");
$sanitized_filename = str_replace($death_characters, "_", $filename); $sanitized_filename = str_replace($death_characters, "_", $filename);