[xdebug-dev] Bug 0000146: xt trace files -> quotes within array key name's are not escaped

From: <xdebug-dev[@]lists.xdebug.org>
Date: Fri, 23 Sep 2005 10:24:33 +0200

The following bug has been RESOLVED.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000146
======================================================================
Reporter: mariuszn3
Handler: derick
======================================================================
Project: Xdebug
Bug ID: 146
Category: Debug client (console)
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Operating System: Windows XP
PHP Version: 5.0.4
Xdebug Version: 2.0.0beta2
Resolution: fixed
======================================================================
Date Submitted: 2005-09-03 01:12 CEST
Last Modified: 2005-09-23 10:24 CEST
======================================================================
Summary: xt trace files -> quotes within array key name's are not escaped
Description:
Within content of trace files (*.xt). Arrays presented as function
parameters or returns has unescaped quotes within key names (values are
fine). This doesn't affects xdebug extension but affects any software that
makes use of that.

======================================================================

----------------------------------------------------------------------
 derick - 2005-09-22 20:45 CEST
----------------------------------------------------------------------
I can't reproduce this with the latest cvs version of Xdebug. The following
script:

<?php
    $tf = xdebug_start_trace('/tmp/'. uniqid('xdt', TRUE));

    function foo($a)
    {
        return $a;
    }

    $array = array("te\"st's" => 42);
    foo($array);

    echo file_get_contents($tf);
    unlink($tf);
?>

produces the following output:
TRACE START [2005-09-22 18:44:51]
    0.0011 44184 -> foo(array ('te"st\'s' => 42))
/dat/dev/php/xdebug/tests/bug00146.php:10
>=> array ('te"st\'s' => 42)
    0.0012 44240 ->
file_get_contents('/tmp/xdt4332fba354c818.92692592.xt')
/dat/dev/php/xdebug/tests/bug00146.php:12

as you can see, the quote (') is succesfully escaped.

Please provide a script where the trace file does not have this.

----------------------------------------------------------------------
 mariuszn3 - 2005-09-23 02:59 CEST
----------------------------------------------------------------------
Sorry my fault I was using 2.0.0beta1 version. I've just updated. Thanks!

edited on: 2005-09-23 02:59

----------------------------------------------------------------------
 derick - 2005-09-23 10:24 CEST
----------------------------------------------------------------------
Okay, considered "fixed" then.

Bug History
Date Modified Username Field Change
======================================================================
2005-09-03 01:12mariuszn3 New Bug
2005-09-03 01:12mariuszn3 Bug Monitored: mariuszn3
2005-09-22 20:45derick Bugnote Added: 0000289
2005-09-22 20:45derick Status new => feedback
2005-09-23 02:49mariuszn3 Bugnote Added: 0000292
2005-09-23 02:59mariuszn3 Bugnote Edited: 0000292
2005-09-23 10:24derick Bugnote Added: 0000294
2005-09-23 10:24derick Assigned To => derick
2005-09-23 10:24derick Resolution open => fixed
2005-09-23 10:24derick Status feedback => resolved
======================================================================
Received on Fri Sep 23 2005 - 10:24:36 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST