capacitor-community / capacitor-community/electron

Blob url ignores CSP

Open
#215 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
398
Forks
63
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When accessing a resource via blob protocol, capacitor-electron gets ignored on the CSP.

**To Reproduce**
Steps to reproduce the behavior:

1. Try to access a blob resource with blob:capacitor-electron://-/

**Expected behavior**
No CSP errors since it's comming from the same application's schema

**Screenshots**
![image](https://user-images.githubusercontent.com/55885320/196909483-0f42a903-1d35-49a6-a1e3-67b8c3be0f7a.png)

**Desktop (please complete the following information):**

- OS: [Windows 10]

**Additional context**
Ionic Capacitor app with React. Trying to import [https://www.npmjs.com/package/react-media-recorder](https://www.npmjs.com/package/react-media-recorder)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing access to blob:capacitor-electron://-/ in the Windows Electron app and inspect where the app's Content Security Policy is configured. Done means the blob resource is treated as coming from the application's schema and loads without a CSP error.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.