Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-137198

Moving beyond AntiSamy for XSS security: iframe sandbox

    Details

    • Type: Feature Request
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Application Security, Blogs
    • Labels:
      None

      Description

      Currently, XSS protection relies on AntiSamy for content that includes HTML (e.g., Blog entries). This has a few drawbacks:

      • AntiSamy relies on pattern matching which means it's only as good as the pattern that is used to find scripts.
      • AntiSamy prevents non-malicious scripts from working
      • AntiSamy is a 3rd party library

      Proposal:
      Serve each blog entry in it's own sandboxed iframes. This has the advantage of:

      • One less library to rely on
      • Security will handled by the browser, i.e., admins don't need to deploy a new version of DXP to get a fix
      • Blog writers can include non-malicious scripts in their blog entries.

       


      Current:

      Main Page:

      <html>
      ...
      <div>[BLOG ENTRY 1]</div>
      ...
      <div>[BLOG ENTRY 2]</div>
      ...
      <div>[BLOG ENTRY 3]</div>
      ...
      </html>

       

      Proposal:

      Main Page:

      <html>
      ...
      <iframe src="url1.jsp" sandbox="allow-scripts" />
      ...
      <iframe src="url2.jsp" sandbox="allow-scripts" />
      ...
      <iframe src="url3.jsp" sandbox="allow-scripts" />
      ...
      </html>

      url1.jsp:

      <html>
      ...
      <div>[BLOG ENTRY 1]</div>
      ...
      </html>

      url2.jsp:

      <html>
      ...
      <div>[BLOG ENTRY 2]</div>
      ...
      </html>

      url3.jsp:

      <html>
      ...
      <div>[BLOG ENTRY 3]</div>
      ...
      </html>

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            samuel.kong Samuel Kong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package