Bug #75302 [Opn]: php file downlaod
Edit report at https://bugs.php.net/bug.php?id=75302&edit=1
ID: 75302
Updated by: ab@php.net
Reported by: franciszek dot witt at protonmail dot com
Summary: php file downlaod
Status: Open
Type: Bug
Package: Built-in web server
Operating System: Windows
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
Thanks for the report. I don't think it's a Windows bug, as 7.1 and even since 5.5 or
earlier doesn't support non NTFS based Windows versions. There are still OSes supporting FSes
with no case sensitivity, though. The code in the description sounds reasonable, but I've no
such system at hand to test the actual behaviors. If one would provide a patch that at least
doesn't breach the current functionality, it could be evaluated.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-10-01 18:19:34] esminis at esminis dot lt
More info - this bug is in PHP built-in server (only possible workaround without changing source
code of PHP for now is to enable router script).
I am the developer who helped identify this bug (contact on email if needed).
------------------------------------------------------------------------
[2017-10-01 16:59:58] franciszek dot witt at protonmail dot com
Description:
------------
In some machines with FAT file system if you type file.PHP (PHP uppercase) instead of file.php it
will start downloading source code. Tested on android PHP webserver but developer said that
it's general php bug.
Part of email wich he sent to me
"
Hi, Yes it is a bug of PHP itself, the reason is that in file: sapi/cli/php_cli_server.c It is used
'memcmp(client->request.ext, "php", 3)' instead of
'strncasecmp(client->request.ext, "php", 3)' (it should ignore
"php" case, but it does not as of now) This happens only if filesystem is case insesintive
(for example FAT)
"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75302&edit=1
Thread (5 messages)