+ {{ subject }} +
+ ++ 받는 사람 + {{ formatAddressList(message.to) }} +
++ 참조 + {{ formatAddressList(message.cc) }} +
+
+
diff --git a/frontend/index.html b/frontend/index.html index 3f0455e..ad388cb 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,8 +4,8 @@ - -
+ {{ item.errorMessage }} +
+안녕하세요
' }) + const tokens = (frame.getAttribute('sandbox') ?? '').split(/\s+/).filter(Boolean).sort() + + expect(tokens).toEqual(['allow-popups', 'allow-popups-to-escape-sandbox', 'allow-same-origin']) + // 스크립트·폼은 절대 허용하지 않는다 (allow-same-origin 과 allow-scripts 를 같이 쓰면 격리가 무너진다) + expect(tokens).not.toContain('allow-scripts') + expect(tokens).not.toContain('allow-forms') + expect(tokens).not.toContain('allow-top-navigation') + }) + + it('본문은 srcdoc 으로만 넣고 외부 주소(src)를 쓰지 않는다', () => { + const frame = frameOf({ htmlBody: '안녕하세요
' }) + + expect(frame.hasAttribute('src')).toBe(false) + expect(frame.getAttribute('srcdoc')).toContain('안녕하세요
') + }) + + it('srcdoc 문서에 내부 CSP 와본문
' }).getAttribute('srcdoc') ?? '' + + expect(srcdoc).toContain(`content="${MAIL_FRAME_CSP}"`) + expect(srcdoc).toContain('본문
+ 받는 사람 + {{ formatAddressList(message.to) }} +
++ 참조 + {{ formatAddressList(message.cc) }} +
+
+