Pages

Sunday, September 22, 2019

Phishing vulnerability on using target="_blank"; also performance downgrade

target="_blank" and window.open keep the window.opener reference towards parent/source site. Thus it opens the possibility of phishing attack.

Therefore we should use in HTML : rel="noopener noreferrer"

and in Javascript:
const newWindow = window.open('https://gosink.in');
newWindow.opener = null;

For details: here

Source: here

No comments :

Post a Comment