The (Inline frame) tag is used to embed another HTML document or web resource inside the current webpage. It essentially creates a nested browser window within your layout.</p> <p>There are security risks that can be created by using iframes unless handled in the right manner. As an example, content that uses embedded external websites can create the risk of clickjacking or script injections. To counter these:</p> <ul> <li>Take a sandbox attribute to limit the frame behaviour (block scripts, forms, or popups).</li> <li>Never leave an unverified source dangling as src, or domain, etc.</li> <li>Integrate the sandbox with the ability to allow attributes to have more precise control. </li> </ul> <div class=”highlight”><pre class=”highlight html”><code><span class=”nt”><iframe</span> <span class=”na”>src=</span><span class=”s”>”https://www.youtube.com”</span> <span class=”na”>sandbox=</span><span class=”s”>”allow-scripts allow-same-origin”</span><span class=”nt”>></iframe></span> </code></pre></div> <p></p>
IFrame 태그의 보안 고려 사항
작성자
카테고리:
← 피드로
추출 본문 · 출처: dev.to · https://dev.to/jaisurya/security-considerations-in-iframe-tag-51po
답글 남기기