
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
browser-dead
Advanced tools
Inform users that their browser is unsupported by your website
npm i --save browser-dead
Download browser-dead.min.js and place it in appropriate directory of your choice.
wget "https://raw.githubusercontent.com/techgaun/browser-dead/master/dist/browser-dead.min.js" -O browser-dead.min.js
Include the script in your html:
<script src="/path/to/browser-dead.min.js" charset="utf-8"></script>
Download browser-dead.min.css and place it in appropriate directory of your choice.
wget https://raw.githubusercontent.com/techgaun/browser-dead/master/dist/css/browser-dead.min.css -O browser-dead.min.css
Include the stylesheet in your html:
<link rel="stylesheet" href="/path/to/browser-dead.min.css" media="screen">
Add a html element with content inside it as you wish.
<div id="browser-dead">
Unsupported browser
</div>
If using the node module, in your source files, import the browser-dead
module and then initialize as below:
import browserDead from 'browser-dead'
browserDead({
background: #f00,
color: #fff,
supportBreakpoint: 'promise',
browserDead: 'browser-dead'
})
If directly using in html, place the initialization code right below the script tag:
<script src="/path/to/browser-dead.min.js" charset="utf-8"></script>
<script type="text/javascript">
browserDead({
background: #f00,
color: #fff,
supportBreakpoint: 'promise',
browserDead: 'browser-dead'
})
</script>
Refer to caniuse.com to know what support breakpoint can you use for your scenario. Below are some of the common ones that you can use as breakpoints to not support your choices of browsers:
promise
(<= IE11) - Promise check is a special implementation in browser-dead which is useful for detecting IE11 properly if you do not wish to support IE11 and below.transform
(<= IE8) - CSS transformborderImage
(<= IE10) - CSS Border ImageborderSpacing
(<= IE7) - CSS Border Spacingnpm i
npm run dev
http://localhost:3000/examples/
and see what they do with your changesAlso, feel free to contribute by providing more breakpoints.
FAQs
Identify old and unsupported browsers simple easy way
The npm package browser-dead receives a total of 3 weekly downloads. As such, browser-dead popularity was classified as not popular.
We found that browser-dead demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.