fix: Workflow scanning (#22273)
This commit is contained in:
@@ -120,7 +120,7 @@ describe("scanWorkflowBody", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should lock user and not update step if content is spam", async () => {
|
||||
it.skip("should lock user and not update step if content is spam", async () => {
|
||||
const payload = JSON.stringify({
|
||||
userId: 1,
|
||||
workflowStepIds: [1],
|
||||
|
||||
@@ -3,7 +3,6 @@ import z from "zod";
|
||||
import { getTemplateBodyForAction } from "@calcom/features/ee/workflows/lib/actionHelperFunctions";
|
||||
import compareReminderBodyToTemplate from "@calcom/features/ee/workflows/lib/compareReminderBodyToTemplate";
|
||||
import { Task } from "@calcom/features/tasker/repository";
|
||||
import { lockUser, LockReason } from "@calcom/lib/autoLock";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import { getTranslation } from "@calcom/lib/server/i18n";
|
||||
import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";
|
||||
@@ -112,7 +111,6 @@ export async function scanWorkflowBody(payload: string) {
|
||||
if (!workflowStep.workflow.user?.whitelistWorkflows) {
|
||||
// We won't delete the workflow step incase it is flagged as a false positive
|
||||
log.warn(`Workflow step ${workflowStep.id} is spam with body ${workflowStep.reminderBody}`);
|
||||
await lockUser("userId", userId.toString(), LockReason.SPAM_WORKFLOW_BODY);
|
||||
|
||||
// Return early if spam is detected
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user