Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shell-quote

Package Overview
Dependencies
Maintainers
4
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shell-quote - npm Package Compare versions

Comparing version 1.7.2 to 1.7.3

.github/workflows/nodejs.yml

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # acorn-node change log

## 1.7.3
* Fix a security issue where the regex for windows drive letters allowed some shell meta-characters
to escape the quoting rules. (CVE-2021-42740)
## 1.7.2

@@ -9,0 +13,0 @@ * Fix a regression introduced in 1.6.3. This reverts the Windows path quoting fix. ([144e1c2](https://github.com/substack/node-shell-quote/commit/144e1c20cd57549a414c827fb3032e60b7b8721c))

2

index.js

@@ -13,3 +13,3 @@ exports.quote = function (xs) {

else {
return String(s).replace(/([A-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '$1\\$2');
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '$1\\$2');
}

@@ -16,0 +16,0 @@ }).join(' ');

{
"name": "shell-quote",
"description": "quote and parse shell commands",
"version": "1.7.2",
"version": "1.7.3",
"author": {

@@ -6,0 +6,0 @@ "name": "James Halliday",

@@ -43,1 +43,7 @@ var test = require('tape');

})
test("chars for windows paths don't break out", function (t) {
var x = '`:\\a\\b'
t.equal(quote([x]), '\\`\\:\\\\a\\\\b')
t.end()
})

Sorry, the diff of this file is not supported yet

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