jspreadsheet / jspreadsheet/ce
CSP violation when unsafe-inline not used
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 890
- PR merge metrics
- No merged PRs in 30d
Description
Firefox (although not Chrome) reports a CSP issue due to the line:
obj.corner.setAttribute('onselectstart', 'return false');
Firefox 94 gives error
Content Security Policy: The page's settings observed the loading of a resource at inline ("script-src").
This is version 4.9.6 from npm.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the obj.corner.setAttribute('onselectstart', 'return false') call mentioned in the issue and reproduce it in Firefox with a CSP that omits unsafe-inline. Determine the appropriate change from the surrounding behavior; done means the CSP violation is no longer reported while selection handling still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100