View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001682 | Xdebug | Step Debugging | public | 2019-07-11 08:08 | 2019-07-25 14:19 |
| Reporter | arnaud-lb | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.7.2 | ||||
| Target Version | 2.8.0dev | Fixed in Version | 2.8.0beta1 | ||
| Summary | 0001682: Invalid character reference (null byte) in debugger XML | ||||
| Description | When debugging, the XML might contain encoded null bytes (). These appear to not be allowed in XML, and they cause a parse error in libxml. Example: classname="class@anonymous/tmp/phpstan-tests/cache/nette.configurator/Container_6005a4979b.php0x7fbf3b58444b" In vim/vdebug, this results in the following error: An error occured: <class 'xml.etree.ElementTree.ParseError'> | ||||
| Tags | No tags attached. | ||||
| Operating System | |||||
| PHP Version | 7.3.5-7.3.9 | ||||
|
|
Mantis apparently converted my xml-encoded null bytes to actual null bytes. Please read � instead of |
|
|
Can you please add the additional information as is requested at https://xdebug.org/support.php#remote ? |
|
|
Sure! Here is a reproducing script, and the xdebug.log. You can see the encoded null byte at line 25, after the <code>context_get -i 7 -c 0 -d 0</code> command. |
|
|
Fixed in GitHub for 2.8.0alpha2 |
|
|
Thanks ! |
|
|
Please note that your IDE still needs to set that extended_properties feature for this to work. |
|
|
Hi, (seem that I wrote this note, but never posted it) I did have a look, and although there is a bug here, it is not the one you've brought up. The DBGp protocol has a specific feature to turn on "extended_properties" (https://xdebug.org/docs-dbgp.php#extended-properties) that IDEs need to opt into to work around the problem if having invalid XML characters in attribute values. This is an opt-in feature, as otherwise IDEs that don't enable it might get data back they originally did not expect. The bug here is that when either of the "name, fullname, classname or value" elements needs to be encoded, all need to be encoded. And Xdebug does not do that at the moment: it will only do the "classname" as extended property if invalid XML characters are found, but not name or fullname. The latter is now fixed for Xdebug 2.8.0alpha2. cheers, |