Skip to content

A middle ground between enabling JS on preview and preventing XSS attack. #1644

@Rokt33r

Description

@Rokt33r

There are lots of feedback.
Someone want to make it possible to use JS on the markdown preview.
But, some other people want strict sanitizing for security.

I'm actually agree with using JS should be fine. The only attack vector is writing attack code on the markdown. I think our most users are developer, so they can prevent the attack by theirselves.

But, Electron has too much power. It can access and manipulate filesystem and shell.

So, I think we should hosting the app on electron via http.(It means making electron main processor as a web server. If we need ipc, we can exploit websocket.) So, all local images, starting with file://~~, and electron instance won't be able to access. And, giving an option to sanitize HTML strictly should be enough.

I believe this should be a nice point of compromise. How do you think guys?

Metadata

Metadata

Assignees

Labels

discussion 💬Issue concerns a discussion.help wanted 🆘Pull request/issue requires extra help from the community. Check these out if you're new!

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions