Page MenuHomePhorge

D5817.1775203862.diff
No OneTemporary

Authored By
Unknown
Size
1018 B
Referenced Files
None
Subscribers
None

D5817.1775203862.diff

diff --git a/src/app/Backends/DAV.php b/src/app/Backends/DAV.php
--- a/src/app/Backends/DAV.php
+++ b/src/app/Backends/DAV.php
@@ -763,7 +763,7 @@
$doc = new \DOMDocument('1.0', 'UTF-8');
if (str_starts_with($xml, '<?xml')) {
- if (!$doc->loadXML($xml)) {
+ if (!$doc->loadXML($xml, LIBXML_PARSEHUGE)) {
throw new \Exception("Failed to parse XML");
}
@@ -798,10 +798,17 @@
$doc->formatOutput = true;
$doc->preserveWhiteSpace = false;
- if (!$doc->loadXML($body)) {
+ libxml_use_internal_errors(true);
+
+ if (!$doc->loadXML($body, LIBXML_PARSEHUGE)) {
throw new \Exception("Failed to parse XML");
}
+ foreach (libxml_get_errors() as $error) {
+ \Log::error(trim($error->message) . " on line " . $error->line . PHP_EOL);
+ }
+ libxml_clear_errors();
+
$body = $doc->saveXML();
}

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 3, 8:11 AM (18 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18807276
Default Alt Text
D5817.1775203862.diff (1018 B)

Event Timeline