note 40935 added to function.mime-content-type

From: Date: Tue, 23 Mar 2004 20:11:31 +0000
Subject: note 40935 added to function.mime-content-type
Groups: php.notes 
Request: Send a blank email to php-notes+get-67074@lists.php.net to get a copy of this message
Not escaping things used on shell commands is a potential security breach, the function should be rewriten like this: <? if (!function_exists ("mime_content_type")) { function mime_content_type ($file) { return exec ("file -bi " . escapeshellcmd($file)); } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.mime-content-type.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40935 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40935&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40935&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67074) next »