Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117668763
D5817.1774873680.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1018 B
Referenced Files
None
Subscribers
None
D5817.1774873680.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 12:28 PM (2 d, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18807276
Default Alt Text
D5817.1774873680.diff (1018 B)
Attached To
Mode
D5817: Use LIBXML_PARSEHUGE to successfully parse large attachments.
Attached
Detach File
Event Timeline