diff --git a/lib/Service/MetadataService.php b/lib/Service/MetadataService.php index 36ccc833..5c0daddc 100644 --- a/lib/Service/MetadataService.php +++ b/lib/Service/MetadataService.php @@ -85,7 +85,8 @@ public function getEnrichedProviders(): array { } private function getIdFromSource(string $sourceId): string { - if (!preg_match('/^[^: ]+__[^: ]+: (\d+)$/', $sourceId, $matches)) { + // note the ":" in the item id part + if (!preg_match('/^[a-zA-Z0-9_-]+__[a-zA-Z0-9_-]+: ([a-zA-Z0-9:-])+$/', $sourceId, $matches)) { throw new \InvalidArgumentException("Invalid source id $sourceId"); } return $matches[1];