Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Isn't this a huge security hole? #40

Open
Bilge opened this issue Oct 25, 2020 · 8 comments
Open

Isn't this a huge security hole? #40

Bilge opened this issue Oct 25, 2020 · 8 comments

Comments

@Bilge
Copy link

Bilge commented Oct 25, 2020

It seems to me that anyone deploying the "magic iframe" onto their site allows anyone to read their local storage for that site. If that's the case, and no means of mitigation are provided, at the very least this should be expressed clearly at the top of the readme in large lettering to make users aware of the security implications of deploying this code.

@ofirdagan
Copy link
Owner

Not sure I understand the "security implications" that you're talking about. Can u please describe a possible exploit?
The localStorage is saved on the client's machine. It's not accessible from other devices. The purpose of the "magic iframe" is to serve as a bridge between the two domains but on for the same client.

@ofirdagan
Copy link
Owner

I think that I see what you're talking about,. In case someone uses iframe X and then a malicious site uses this lib to read iframe X's localstorage. I guess it's fixable by limiting the onMessage to a known domain only. WDYT?

@Bilge
Copy link
Author

Bilge commented Oct 25, 2020

I'm pretty sure that's exactly what has been proposed before such as in #17 and #19.

@ofirdagan
Copy link
Owner

Unfortunately #19 was never merged :/

@Bilge
Copy link
Author

Bilge commented Oct 25, 2020

As I can see. Why not?

@ofirdagan
Copy link
Owner

there were missing tests and conflicts that were not fixed.

@Bilge
Copy link
Author

Bilge commented Oct 25, 2020

Sometimes it's a good idea to work together on a PR instead of just demanding the author to make all the changes you want.

@ofirdagan
Copy link
Owner

ofirdagan commented Oct 25, 2020

I agree

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants