sanitize all user inputs, fix #2172

This commit is contained in:
Amruth Pillai
2025-01-24 23:53:45 +01:00
parent 308a8e3ae3
commit c7ae0e94d7
29 changed files with 190 additions and 99 deletions

View File

@ -18,12 +18,12 @@ export const BuilderPage = () => {
const title = useResumeStore((state) => state.resume.title);
const updateResumeInFrame = useCallback(() => {
if (!frameRef?.contentWindow) return;
const message = { type: "SET_RESUME", payload: resume.data };
(() => {
frameRef.contentWindow.postMessage(message, "*");
})();
}, [frameRef, resume.data]);
setImmediate(() => {
frameRef?.contentWindow?.postMessage(message, "*");
});
}, [frameRef?.contentWindow, resume.data]);
// Send resume data to iframe on initial load
useEffect(() => {