aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-08-13 09:46:01 +0200
committerMario Vavti <mario@mariovavti.com>2019-08-13 09:46:01 +0200
commite8f3b7f8530c69045dcabffecab2f158d0b35214 (patch)
treee02872bbb9a7226f30f78a1784fae113431eceaa /vendor/sabre/xml
parent892e9cd835612c8155bf3c15436137f94abbb667 (diff)
parente28341ca4beb1b746a5c17590f62c02cc8df49ba (diff)
downloadvolse-hubzilla-e8f3b7f8530c69045dcabffecab2f158d0b35214.tar.gz
volse-hubzilla-e8f3b7f8530c69045dcabffecab2f158d0b35214.tar.bz2
volse-hubzilla-e8f3b7f8530c69045dcabffecab2f158d0b35214.zip
Merge branch '4.4RC'4.4
Diffstat (limited to 'vendor/sabre/xml')
-rw-r--r--vendor/sabre/xml/CHANGELOG.md6
-rw-r--r--vendor/sabre/xml/composer.json2
-rw-r--r--vendor/sabre/xml/lib/Deserializer/functions.php33
-rw-r--r--vendor/sabre/xml/lib/Service.php3
4 files changed, 38 insertions, 6 deletions
diff --git a/vendor/sabre/xml/CHANGELOG.md b/vendor/sabre/xml/CHANGELOG.md
index 39a39bffe..faeba20e5 100644
--- a/vendor/sabre/xml/CHANGELOG.md
+++ b/vendor/sabre/xml/CHANGELOG.md
@@ -1,6 +1,12 @@
ChangeLog
=========
+1.5.1 (2019-01-09)
+------------------
+
+* #161: Prevent infinite loop on empty xml elements
+
+
1.5.0 (2016-10-09)
------------------
diff --git a/vendor/sabre/xml/composer.json b/vendor/sabre/xml/composer.json
index 386f8213f..1b5760393 100644
--- a/vendor/sabre/xml/composer.json
+++ b/vendor/sabre/xml/composer.json
@@ -45,7 +45,7 @@
},
"require-dev": {
"sabre/cs": "~1.0.0",
- "phpunit/phpunit" : "*"
+ "phpunit/phpunit" : "~4.8|~5.7"
},
"config" : {
"bin-dir" : "bin/"
diff --git a/vendor/sabre/xml/lib/Deserializer/functions.php b/vendor/sabre/xml/lib/Deserializer/functions.php
index 2e5d877e9..07038d99a 100644
--- a/vendor/sabre/xml/lib/Deserializer/functions.php
+++ b/vendor/sabre/xml/lib/Deserializer/functions.php
@@ -66,9 +66,20 @@ function keyValue(Reader $reader, $namespace = null) {
return [];
}
+ if (!$reader->read()) {
+ $reader->next();
+
+ return [];
+ }
+
+ if (Reader::END_ELEMENT === $reader->nodeType) {
+ $reader->next();
+
+ return [];
+ }
+
$values = [];
- $reader->read();
do {
if ($reader->nodeType === Reader::ELEMENT) {
@@ -79,7 +90,9 @@ function keyValue(Reader $reader, $namespace = null) {
$values[$clark] = $reader->parseCurrentElement()['value'];
}
} else {
- $reader->read();
+ if (!$reader->read()) {
+ break;
+ }
}
} while ($reader->nodeType !== Reader::END_ELEMENT);
@@ -144,7 +157,17 @@ function enum(Reader $reader, $namespace = null) {
$reader->next();
return [];
}
- $reader->read();
+ if (!$reader->read()) {
+ $reader->next();
+
+ return [];
+ }
+
+ if (Reader::END_ELEMENT === $reader->nodeType) {
+ $reader->next();
+
+ return [];
+ }
$currentDepth = $reader->depth;
$values = [];
@@ -204,7 +227,9 @@ function valueObject(Reader $reader, $className, $namespace) {
$reader->next();
}
} else {
- $reader->read();
+ if (!$reader->read()) {
+ break;
+ }
}
} while ($reader->nodeType !== Reader::END_ELEMENT);
diff --git a/vendor/sabre/xml/lib/Service.php b/vendor/sabre/xml/lib/Service.php
index 09ee341cf..acea94ea9 100644
--- a/vendor/sabre/xml/lib/Service.php
+++ b/vendor/sabre/xml/lib/Service.php
@@ -138,7 +138,8 @@ class Service {
* @param string|string[] $rootElementName
* @param string|resource $input
* @param string|null $contextUri
- * @return void
+ * @throws ParseException
+ * @return array|object|string
*/
function expect($rootElementName, $input, $contextUri = null) {