Background
Today eslint reports an error when I introduce eslint-plugin-react
error Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener react/jsx-no-target-blankWhy
Opening a new tab/window, either by hyperlinks (i.e tag with target attribute set to _blank) or programmatically calling window.open, will grant the newly-opened tab/window access back to the originating tab/window via window.opener. Therefore, the newly opened tab/window can then change the window.opener.location to redirect to the phishing page in the background, or execute some JavaScript on the opener-page on your behalf.
How to fixhtyperlink types
Add rel="noopenner" to outgoing links. E.g.
Specify noopener in window features
window.open("https://abc.com", "security", "noopener");
Reset opener property
Note: this technique is subject to Same Origin Policy
let nw = window.open("https://abc.com", "security"); nw.opener = null;Reference
About rel=noopener
Target="_blank" - the most underestimated vulnerability ever
NoticeIf you want to follow the latest news/articles for the series of my blogs, Please 「Watch」to Subscribe.
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/11397.html
摘要:安装略创建用户创建用户组创建用户,并修改密码将用户添加到组权限设置找到一行,添加用户,如下。切换账号之后,没有对应文件的权限导致,删除相关的东西即可。解决在中配置为,注意要在下面 1、安装JDK8 略 2、创建用户 创建bigdata 用户组 groupadd bigdata 创建用户es,并修改密码 useradd es passwd es 将es用户添加到bigdata组 use...
摘要:执行免密码登陆报错。从库也需要修改配置文件,同样增加最后两行,注意要不同。重启两台服务器服务,。检查下从库的配置信息,注意和两个配置项必须为,否则存在问题。配置完成,进行下测试。查询下从库信息。 1.从oracle官网下载mysql安装包。 mysql-server_5.7.18-1ubuntu16.04_amd64.deb-bundle.tar 2.解压缩安装包。 tar -xf ...
摘要:执行免密码登陆报错。从库也需要修改配置文件,同样增加最后两行,注意要不同。重启两台服务器服务,。检查下从库的配置信息,注意和两个配置项必须为,否则存在问题。配置完成,进行下测试。查询下从库信息。 1.从oracle官网下载mysql安装包。 mysql-server_5.7.18-1ubuntu16.04_amd64.deb-bundle.tar 2.解压缩安装包。 tar -xf ...
摘要:概念解释参考安装可参考安装扩展下载插件包通过命令安装配置相关权限上述操作提示即为需添加下述配置添加下述配置至文件通过生成证书配置下述参数至开启支持自定义内置账户密码账户为超级 elasticsearch概念解释参考: https://segmentfault.com/a/11...elasticsearch安装可参考:https://segmentfault.com/a/11... ...
摘要:调试技巧系列文章让你秒变全栈开发的黑科技系列文章在阿里云上打造属于你自己的完整开发环境安装系列文章在阿里云上打造属于你自己的完整开发环境安装系列文章在阿里云上打造属于 showImg(https://segmentfault.com/img/remote/1460000015155250?w=1712&h=862); Neon Genesis Evangelion(EVA) is on...
阅读 2749·2021-11-22 12:06
阅读 2658·2021-09-04 16:45
阅读 462·2021-09-03 10:29
阅读 5942·2021-09-02 09:52
阅读 1908·2019-08-30 15:52
阅读 3283·2019-08-29 16:39
阅读 1070·2019-08-29 15:35
阅读 1943·2019-08-29 15:17