Bug #78023 [NEW]: PHP File MIME content Type

From: Date: Fri, 17 May 2019 07:50:27 +0000
Subject: Bug #78023 [NEW]: PHP File MIME content Type
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220874@lists.php.net to get a copy of this message
From: mertwal2 at gmail dot com Operating system: windows PHP version: 7.1.29 Package: Unknown/Other Function Bug Type: Bug Bug description:PHP File MIME content Type Description: ------------ --- From manual page: https://php.net/function.mime-content-type --- I am trying to upload files which has php code inserted in files. according to mime type checking through the mime type for php files but still its through the mime type for image here is the example of image in base64 value <?php echo "hello world"?> PK here is the starting of image base64 value the code was blocked this image but not this type of content image. PK <?php echo "hello world"?> i have upload the image that contains the particular code Test script: --------------- <?php $_FILES['file']['name']; $var = mime_content_type($_FILES); echo $var; ?> Expected result: ---------------- error result on invalid mime types Actual result: -------------- success result on invalid mime type -- Edit bug report at https://bugs.php.net/bug.php?id=78023&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78023&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78023&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78023&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=78023&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78023&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78023&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78023&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78023&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78023&r=support Expected behavior: https://bugs.php.net/fix.php?id=78023&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78023&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78023&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78023&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78023&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=78023&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78023&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78023&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78023&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78023&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78023&r=mysqlcfg

« previous php.bugs (#220874) next »