Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
prevent-window-opener-attacks
Advanced tools
This extreme tiny script will prevent the default behaviour of a click on an a-tag with taget="_blank"
, open the link using window.open
and ensure that window.opener = null
.
You are able to set the rel="noreferrer noopener"
attribute on an a-tag. This will also prevent to call window.opener
on the location page. But this will only handle simple links.
<a href="http://example.com" target="_blank" rel="noreferrer noopener">Click me!</a>
Copy the following code in your dev-tools on your webpage and click on the generated link on the bottom of your page. If your page redirect after clicking the generated link, you will need this fix.
(() => {
const a = document.createElement('a');
a.href =
'https://merkle-open.github.io/prevent-window-opener-attacks/example/evil-page.html';
a.target = '_blank';
a.innerHTML = 'Click me!';
document.body.appendChild(a);
})();
Fixes the attack vector on document ready automatically
import('prevent-window-opener-attacks');
Fixes the attack vector on document ready automatically
require('prevent-window-opener-attacks');
Allows to call the fix explicitely
import { preventWindowOpenerAttacks } from 'prevent-window-opener-attacks/src/lib';
preventWindowOpenerAttacks();
Allows to call the fix explicitely
const {
preventWindowOpenerAttacks,
} = require('prevent-window-opener-attacks/dist/lib.js');
preventWindowOpenerAttacks();
Allows to call the fix explicitely
require('prevent-window-opener-attacks/dist/lib.js', function ({
preventWindowOpenerAttacks,
}) {
preventWindowOpenerAttacks();
});
FAQs
Prevent window.opener attacks for _blank links
We found that prevent-window-opener-attacks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.