Live data from Hacker News

About rel=noopener

mathiasbynens.github.io

71–80 of 115 posts

Re: About rel=noopener

#71
post #13

This is the new pop-under. Sites trying to serve as many ads as possible will open links with target=_blank and redirect the old window to an ad.

So that's what's happening! With uBlock, all I see is a flicker on the browser's tab bar, and my history is gone. It's still annoyingly retarded.

Re: About rel=noopener

#73
post #11

I'm using Chromium and even the link with `rel=noopener` seems to be able to "hax" the first page. Am I reading it wrong or is `rel=noopener` supposed to protect against this?

Maybe the page changed? I see 3 links: non-Cross-Origin, Cross-Origin and noopener. The third one doesn't "hack" the page for me.

Re: About rel=noopener

#74
Note that all the opened page has control over is closing and changing the address of the tab. You can't insert HTML into the page, for example. Phishing seems to be the only problem this creates, but no more.

Re: About rel=noopener

#75
post #9

Earlier quoted context omitted.

To some extent.. Yes. The attacker can replace the current page with his own phising page. Of course, the hostname part of the url would change, but the user is unlikely to notice that.

Case in point: People still fall for things like `facebook.com.totallynotaphishingsite.com'

[deleted]

Re: About rel=noopener

#76
I built a quick userscript that treats rel="noopener" as default for links with target:"_blank".

It could be worth checking out if you want to avoid experiencing this security issue yourself (but I offer no warranties) or if you want to see if it would break any site you visit if browsers would enable the behavior by default.

https://github.com/jaredsohn/noopener_by_default

Re: About rel=noopener

#77

Earlier quoted context omitted.

This common with OAuth flows. User clicks "login with x", a popup opens that redirects to an authorization page on x. The user then logs in on x, and gets redirected back to origin that takes the token in the hash fragment, and passes it back to the page the user is trying to login to, via window.opener.

Most of these use postMessage.

probably window.opener.postMessage. Though that doesn't excuse window.opener.location not being blocked in the name of the Same-Origin Policy...

Re: About rel=noopener

#78
post #19

Is there a practical reason that a reference to the opener window is given to the opened window? That seems like something we could do without.

Example: Google Slides where one tab has the presentation and another tab has the speaker notes. You want those to be in sync.

There are plenty of other ways to do this e.g. web sockets or localStorage.

Re: About rel=noopener

#80

> Note that this also works when index.html and malicious.html are on different origins — window.opener.location is accessible across origins! ... Why. Why would anyone (not maliciously) consider this desirable behaviour?

I suspect it's not a "why" but simply a "I didn't think to check for that" from the point of view of the person writing the browser.
Post reply on HN