note 40949 added to function.mime-content-type

From: Date: Wed, 24 Mar 2004 14:50:55 +0000
Subject: note 40949 added to function.mime-content-type
Groups: php.notes 
Request: Send a blank email to php-notes+get-67095@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+40949 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40949&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40949&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67095) next »