|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36501 DOMDocument::loadXML(): xmlns:D: 'DAV:' is not a valid URI in Entity
Submitted: 2006-02-23 22:37 UTC Modified: 2006-02-23 23:21 UTC
From: Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5CVS-2006-02-23 (CVS) OS: Linux
Private report: No CVE-ID:
 [2006-02-23 22:37 UTC]
xmlns:D="DAV:" is actually used throughout the DAV RFC.

On another topic, DOMImplementation->createDocumentType("DAV:",...) segfaults.

Reproduce code:

// PROPFIND response (Apache2/DAV2)
$xml = <<<DAVXML
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response xmlns:lp1="DAV:" xmlns:lp2="">
<lp1:getlastmodified>Sat, 12 Nov 2005 11:25:47 GMT</lp1:getlastmodified>
<D:status>HTTP/1.1 200 OK</D:status>

$dom = new DOMImplementation;
$dtd = $dom->createDocumentType("webdav", "", 
$doc = $dom->createDocument("", "", $dtd);
$doc->validateOnParse = true;


Expected result:
Validation success

Actual result:
Notice: DOMDocument::loadXML(): xmlns:D: 'DAV:' is not a valid URI in Entity, line: 2 in ...

Notice: DOMDocument::loadXML(): Validation failed: no DTD found !xmlns:lp1: 'DAV:' is not a valid URI in Entity, line: 3 in ...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-23 23:21 UTC]
 AFAIK, this is fixed in one of the later releases. Anyway not 
a PHP but a libxml2 issue :)
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 01:01:34 2015 UTC