View Issue Details

IDProjectCategoryView StatusLast Update
0001513XdebugStep Debuggingpublic2018-01-07 18:05
ReporterLanaZem Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.6.0beta1 
Summary0001513: Xdebug returns escaped property fullname with enabled extended_properties
Description

If property fullname contains backslashes Xdebug will escape it in 'property_get' response even in extended properties format.

Steps To Reproduce

1) Create a php file
<?php

namespace TestA\TestB\TestC;

class A
{
private $items;

public function __construct()
{
    $this->items = array("\x0" => 1);
}

}

class B extends A {
public function foo() {
echo 1; // Set breakpoint here and inspect $items
}
}

(new B())->foo();

2) Put breakpoint inside 'foo' method and start debugging.

3) Call 'property_get' command for 'TestA\TestB\TestC\Aitems'.
<- property_get -i 20 -n $this->TestA\TestB\TestC\Aitems -d 0 -c 0 -p 0

Result:
<property name="$this->TestA\TestB\TestC\Aitems" fullname="$this->TestA\TestB\TestC\Aitems" type="array" children="1" numchildren="1" page="0" pagesize="100">
<property type="int">
<name encoding="base64"><![CDATA[AA==]]></name>
<fullname encoding="base64"><![CDATA[JHRoaXMtPipUZXN0QVxcVGVzdEJcXFRlc3RDXFxBKml0ZW1zWyIAIl0=]]></fullname><value encoding="base64"><![CDATA[MQ==]]></value>
</property>

Where fullname decodes in "$this->TestA\TestB\TestC\Aitems["\x0"]"

TagsNo tags attached.
Operating System
PHP Version7.1.0-7.1.4

Relationships

duplicate of 0001512 closedderick Xdebug does not properly encode and escape properties with quotes and \0 characters. 

Activities

derick

2018-01-07 18:05

administrator   ~0004552

Turned out to be a duplicate of 0001512. Just like there, you shouldn't escape the property_get command.