Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Epiphany Epiphany
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 295
    • Issues 295
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • EpiphanyEpiphany
  • Issues
  • #1698
Closed
Open
Issue created Feb 13, 2022 by Rohan Kumar@Seirdy

Reader mode crashes on sites with a "sandbox" CSP directive

On websites with a sandbox CSP directive, the "Reader Mode" button isn't ever visible. If Reader Mode is forcibly invoked by prefixing the URL with ephy-reader:, Epiphany crashes with the following message:


(epiphany:2): epiphany-WARNING **: 10:18:48.370: Error running javascript: Cannot execute JavaScript in this document

(epiphany:2): epiphany-WARNING **: 10:19:01.703: Error running javascript: Cannot execute JavaScript in this document

Steps to reproduce:

  1. Navigate to any page on https://seirdy.one
  2. Prefix the URL with ephy-reader: and press Enter
  3. Wait a few seconds and Epiphany will crash

All the pages on seirdy.one are also available on https://envs.net/~seirdy without a CSP header, and Reader Mode works as expected there.

This is the current CSP header:

content-security-policy: default-src 'none'; img-src 'self' data:; style-src 'sha256-U3qGsgQrv/WVcD8FbITGg2xHJ2BBlPeg3VtDpRzPIqM='; style-src-attr 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'; manifest-src https://seirdy.one/manifest.min.ca9097c5e38b68514ddcee23bc6d4d62.webmanifest; upgrade-insecure-requests; navigate-to 'none'; sandbox allow-same-origin

If I alter the CSP header's sandbox directive to this:

sandbox allow-scripts

then Reader Mode works fine. I even see the button show up in the address bar.

For reference, all other browsers I've tried (Firefox, Chromium, Safari) can handle even an empty sandbox directive.

Assignee
Assign to
Time tracking