Socket
Socket
Sign inDemoInstall

@braintree/sanitize-url

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@braintree/sanitize-url - npm Package Compare versions

Comparing version 6.0.3 to 6.0.4

4

CHANGELOG.md
# CHANGELOG
## 6.0.4
- Add additional null byte sanitization prior to html decoding (#48)
## 6.0.3

@@ -4,0 +8,0 @@

3

dist/index.js

@@ -16,3 +16,4 @@ "use strict";

function decodeHtmlCharacters(str) {
return str.replace(htmlEntitiesRegex, function (match, dec) {
var removedNullByte = str.replace(ctrlCharactersRegex, "");
return removedNullByte.replace(htmlEntitiesRegex, function (match, dec) {
return String.fromCharCode(dec);

@@ -19,0 +20,0 @@ });

{
"name": "@braintree/sanitize-url",
"version": "6.0.3",
"version": "6.0.4",
"description": "A url sanitizer",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -110,2 +110,3 @@ /* eslint-disable no-script-url */

"javasc	ript: alert('XSS');",
"javasc&#\u0000x09;ript:alert(1)",
];

@@ -112,0 +113,0 @@

@@ -17,3 +17,4 @@ const invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im;

function decodeHtmlCharacters(str: string) {
return str.replace(htmlEntitiesRegex, (match, dec) => {
const removedNullByte = str.replace(ctrlCharactersRegex, "");
return removedNullByte.replace(htmlEntitiesRegex, (match, dec) => {
return String.fromCharCode(dec);

@@ -20,0 +21,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc