|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-12-22 07:39 UTC] laruence@php.net
[2011-12-22 07:40 UTC] laruence@php.net
[2011-12-22 07:40 UTC] laruence@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: laruence
[2011-12-22 08:08 UTC] laruence@php.net
[2012-04-18 09:46 UTC] laruence@php.net
[2012-07-24 23:37 UTC] rasmus@php.net
[2013-11-17 09:34 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 11:00:02 2025 UTC |
Description: ------------ report by cjones if built-in server start with a router: <?php if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) return false; // serve the requested resource as-is. else { echo "here"; } ?> then accesss a non-exists file like(a.jpe) will result in mem leak. Test script: --------------- <?php if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) return false; // serve the requested resource as-is. else { echo "here"; } ?> Expected result: ---------------- cjones@mlt:~/w$ php54 -S localhost:8000 routing.php PHP 5.4.0RC4-dev Development Server started at Mon Dec 19 18:55:25 2011 Listening on localhost:8000 Document root is /home/cjones/public_html Press Ctrl-C to quit. [Mon Dec 19 18:55:30 2011] ::1:48358 [200]: /oraclelogo.jpg [Mon Dec 19 18:55:30 2011] Script: '/home/cjones/public_html/favicon.ico' /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/ext/filter/filter.c(451) : Freeing 0xB493F0E4 (16 bytes), script=/home/cjones/public_html/favicon.ico Last leak repeated 19 times [Mon Dec 19 18:55:30 2011] Script: '/home/cjones/public_html/favicon.ico' /home/cjones/phpsrc/php/php-src/branches/PHP_5_4/Zend/zend_execute.h(184) : Freeing 0xB493F19C (65484 bytes), script=/home/cjones/public_html/favicon.ico [Mon Dec 19 18:55:30 2011] Script: '/home/cjones/public_html/favicon.ico' .....