Skip to content

Commit 1dc75b5

Browse files
committed
fix: expand the source id regex item part
Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
1 parent e1be182 commit 1dc75b5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Service/MetadataService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ public function getEnrichedProviders(): array {
8585
}
8686

8787
private function getIdFromSource(string $sourceId): string {
88-
if (!preg_match('/^[^: ]+__[^: ]+: (\d+)$/', $sourceId, $matches)) {
88+
// note the ":" in the item id part
89+
if (!preg_match('^[a-zA-Z0-9_-]+__[a-zA-Z0-9_-]+: ([a-zA-Z0-9:-])+$', $sourceId, $matches)) {
8990
throw new \InvalidArgumentException("Invalid source id $sourceId");
9091
}
9192
return $matches[1];

0 commit comments

Comments
 (0)