Skip to content

Commit 093a5cf

Browse files
fix(custom-blocks): explicit ESCAPE clause on usage-scan LIKE prefilter
1 parent df17670 commit 093a5cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/lib/workflows/custom-blocks/operations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export async function getCustomBlockUsageCounts(
485485
eq(workflowDeploymentVersion.isActive, true),
486486
eq(workflow.isDeployed, true),
487487
orgActiveWorkflow,
488-
sql`${workflowDeploymentVersion.state}::text LIKE ${likePattern}`,
488+
sql`${workflowDeploymentVersion.state}::text LIKE ${likePattern} ESCAPE '\\'`,
489489
sql`EXISTS (
490490
SELECT 1 FROM jsonb_each((${workflowDeploymentVersion.state})::jsonb -> 'blocks') AS b
491491
WHERE b.value ->> 'type' = ${blockType}

0 commit comments

Comments
 (0)