Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
fast-decode-uri-component
Advanced tools
Decodes strings encoded by encodeURI
and encodeURIComponent
, without throwing errors on invalid escapes, instead, it returns null
.
npm install fast-decode-uri-component
const fastDecode = require('fast-decode-uri-component')
console.log(fastDecode('test')) // 'test'
console.log(fastDecode('%25')) // '%'
console.log(fastDecode('/test/hel%2Flo')) // '/test/hel/lo'
console.log(fastDecode('/test/hel%"Flo')) // null
console.log(fastDecode('%7B%ab%7C%de%7D')) // null
console.log(fastDecode('%ab')) // null
You can find the benchmark file here.
# fast-decode-uri-component
ok ~539 ms (0 s + 539114308 ns)
# decodeURIComponent
ok ~6.06 s (6 s + 62305153 ns)
This project has been forked from jridgewell/safe-decode-uri-component
because I wanted to change the behaviour of the library on invalid inputs, plus change some internals.
All the credits before the commit 53000fe
goes to the jridgewell/safe-decode-uri-component
project contributors.
Since the commit 9673ab7
the project will be maintained by @delvedor.
Licensed under MIT.
FAQs
Fast and safe decodeURIComponent
The npm package fast-decode-uri-component receives a total of 4,059,310 weekly downloads. As such, fast-decode-uri-component popularity was classified as popular.
We found that fast-decode-uri-component 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.