feat: add encryption for user input values

This commit is contained in:
RohitR311
2024-11-25 20:58:56 +05:30
parent a83e5be2ec
commit 0ecde828db

View File

@@ -22,6 +22,7 @@ import { getBestSelectorForAction } from "../utils";
import { browserPool } from "../../server"; import { browserPool } from "../../server";
import { uuid } from "uuidv4"; import { uuid } from "uuidv4";
import { capture } from "../../utils/analytics" import { capture } from "../../utils/analytics"
import { encrypt } from "../../utils/auth";
interface PersistedGeneratedData { interface PersistedGeneratedData {
lastUsedSelector: string; lastUsedSelector: string;
@@ -797,7 +798,7 @@ export class WorkflowGenerator {
// when more than one press action is present, add a type action // when more than one press action is present, add a type action
pair.what.splice(index - input.actionCounter, input.actionCounter, { pair.what.splice(index - input.actionCounter, input.actionCounter, {
action: 'type', action: 'type',
args: [input.selector, input.value], args: [input.selector, encrypt(input.value)],
}, { }, {
action: 'waitForLoadState', action: 'waitForLoadState',
args: ['networkidle'], args: ['networkidle'],