1
0
Fork 0

follow spec more closely for subscription request parsing

This commit is contained in:
Jonathan Treffler 2024-06-12 21:50:28 +02:00
parent 41b3d84e9d
commit e0f6f3d27a

View file

@ -107,7 +107,10 @@ class SubscriptionManagementPlugin extends ServerPlugin {
$subscriptionParameterIncluded = True;
if(sizeof($parameter["value"]) == 1) {
$subscriptionType = preg_replace('/^\{DAV:Push\}/', '', $parameter["value"][0]["name"]);
$subscriptionType = $parameter["value"][0]["name"];
$subscriptionType = preg_replace('/^\{DAV:Push\}/', '', $subscriptionType);
$subscriptionType = preg_replace('/-subscription$/', '', $subscriptionType);
$subscriptionOptions = $parameter["value"][0]["value"];
} else {
$errors[] = "only one subscription allowed";