Restrict GridFS lookups to exact model names

This commit is contained in:
Andras Schmelczer 2026-10-27 16:53:52 +00:00
commit 17d83126c7

View file

@ -65,7 +65,9 @@ class LargeFileMongo(LargeFileBase):
for f in self._client.find(
{
"filename": re.compile(
re.escape(self._name + MONGO_NAME_VERSION_SEPARATOR) + ".*"
"^"
+ re.escape(self._name + MONGO_NAME_VERSION_SEPARATOR)
+ r"[0-9]+$"
)
}
)