diff --git a/app/srv/ws/edit/action/get-comp.ts b/app/srv/ws/edit/action/get-comp.ts index e5b5d340..4650ab71 100644 --- a/app/srv/ws/edit/action/get-comp.ts +++ b/app/srv/ws/edit/action/get-comp.ts @@ -9,13 +9,15 @@ import { WS_MSG_SET_COMP, WS_MSG_SV_LOCAL, } from "../../../../web/src/utils/types/ws"; - +import { validate } from "uuid"; export const getComp = async ( ws: ServerWebSocket, msg: WS_MSG_GET_COMP ) => { const comp_id = msg.comp_id; + if (!validate(comp_id)) return; + if (!eg.edit.comp[comp_id]) { const rawComp = await db.component.findFirst({ where: {