Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

chore(api): validate owner IDs as UUIDs (#2944)

tomsideguide9cc10386c7b5
diff --git a/apps/api/src/lib/concurrency-queue-reconciler.ts b/apps/api/src/lib/concurrency-queue-reconciler.ts
index 3edc047b9..b6bb041ba 100644
--- a/apps/api/src/lib/concurrency-queue-reconciler.ts
+++ b/apps/api/src/lib/concurrency-queue-reconciler.ts
@@ -1,4 +1,5 @@
import { Logger } from "winston";
+import { validate as isUUID } from "uuid";
import { getACUCTeam } from "../controllers/auth";
import { getRedisConnection } from "../services/queue-service";
import { scrapeQueue, type NuQJob } from "../services/worker/nuq";
@@ -314,7 +315,7 @@ export async function reconcileConcurrencyQueue(
);
const queueOwners = queueKeys
.map(k => k.replace("concurrency-limit-queue:", ""))
- .filter(id => id.length > 0);
+ .filter(id => id.length > 0 && isUUID(id));
ownerIds = [...new Set([...backlogOwners, ...queueOwners])];
}