Bug #66119 [Com]: FPM full status produces invalid JSON with double quotes in query string
Edit report at https://bugs.php.net/bug.php?id=66119&edit=1
ID: 66119
Comment by: michiel at hazelhof dot nl
Reported by: andy at propcom dot co dot uk
Summary: FPM full status produces invalid JSON with double
quotes in query string
Status: Open
Type: Bug
Package: FPM related
Operating System: CentOS
PHP Version: 5.4.22
Block user comment: N
Private report: N
New Comment:
Seems to be a duplicate of #64539
Previous Comments:
------------------------------------------------------------------------
[2013-11-19 16:51:36] andy at propcom dot co dot uk
Description:
------------
The query string of an FPM request is copied unescaped into the JSON output. If the query string
contains an unescaped double quote, this causes invalid JSON to be output.
The query string is correctly escaped when output as HTML or XML, this needs extending to JSON:
https://github.com/php/php-src/blob/PHP-5.4.22/sapi/fpm/fpm/fpm_status.c#L421
Test script:
---------------
Note that most browsers will urlencode double quotes automatically so CURL (or equivalent) should be
used to test.
curl 'http://localhost/sleep.php?test"foo'
&
curl 'http://localhost/fpmstatus.php?json&full'
Expected result:
----------------
..."request uri":"/sleep.php?test\"foo"...
Actual result:
--------------
..."request uri":"/sleep.php?test"foo"...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66119&edit=1
Thread (3 messages)