question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Black list more origins

See original GitHub issue

Hello Iframe Resizers,

I am working on a project called Boomerang JS which is a performance tracking JS library - https://github.com/akamai/boomerang . For our clients we include our library in special Iframe for performance reasons.

This iframe doesn’t point to real url but we have 3 variations where it points to:

  • <iframe src="about:blank" ...
  • <iframe src="javascript:void(0)" ...
  • <iframe src="..." ...

We noticed that this is causing a problem when Iframe Resizer is calling postMessage():

VM247:1 Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin 'about:blank' in a call to 'postMessage'.
    at <anonymous>:1:8

We instructed our clients to try checkOrigin: false or checkOrigin: ["https://www.example.com"] in order to resolve the problem but we would try to make things smooth in the future.

I see that Iframe Resizer is already a check for file:// here:

function getTargetOrigin(remoteHost) {
    return '' === remoteHost || 'file://' === remoteHost ? '*' : remoteHost
}

Do you think that we can add at least about:blank and javascript:void(0) check in order to black list those “Origins”? If yes I will be happy to contribute with a pull request.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
davidjbradshawcommented, Nov 18, 2019

Thanks for fixing the test as well. Help is always welcome, if you want to look at the outstanding issues 😃

1reaction
davidjbradshawcommented, Nov 10, 2019

Oh I think I better understand what your asking now, happy to take a PR for that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blacklisting - Wikipedia
Blacklisting is the action of a group or authority compiling a blacklist (or black list) of ... Origins of the termEdit. The English...
Read more >
What are the origins of the words "blacklist" and "whitelist"?
I am curious about the origin of the terms "blacklist" and "whitelist", and couldn't readily find a useful etymology of these words.
Read more >
“Blacklists” and “whitelists”: a salutary warning concerning the ...
In this context, it is worth examining the origins of the term “blacklist” from the Douglas Harper Etymology Dictionary, which states that ...
Read more >
Op-Ed | "Blacklist" and "whitelist" aren't racist, you are
For example, the origin of the word blacklist is unclear, but it was not historically associated with race. A contrary example Shaver provided ......
Read more >
Hollywood blacklist | History, Effect on Society, & Facts
The blacklist was implemented by the Hollywood studios to promote their patriotic credentials in the face of public attacks and served to shield...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found