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

ssh-config

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-config - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

6

History.md

@@ -0,1 +1,7 @@

4.0.3 / 2020-08-24
==================
* fix: quote values that contain white spaces
4.0.2 / 2020-02-09

@@ -2,0 +8,0 @@ ==================

9

index.js

@@ -8,2 +8,3 @@ 'use strict'

const RE_SECTION_DIRECTIVE = /^(Host|Match)$/i
const RE_MULTI_VALUE_DIRECTIVE = /^(GlobalKnownHostsFile|Host|IPQoS|SendEnv|UserKnownHostsFile)$/i

@@ -175,3 +176,3 @@ const DIRECTIVE = 1

const quoted = line.quoted
|| (/IdentityFile/i.test(line.param) && RE_SPACE.test(line.value))
|| (!/Command$/i.test(line.param) && RE_SPACE.test(line.value))
const value = formatValue(line.value, quoted)

@@ -304,3 +305,3 @@ str += `${line.param}${line.separator}${value}`

// Host "foo bar"
function patterns() {
function values() {
const results = []

@@ -350,3 +351,3 @@ let val = ''

// Host "foo bar" baz
const multiple = param.toLowerCase() == 'host'
const multiple = RE_MULTI_VALUE_DIRECTIVE.test(param)
const result = {

@@ -357,3 +358,3 @@ type,

quoted: !multiple && chr === '"',
value: multiple ? patterns() : value()
value: multiple ? values() : value()
}

@@ -360,0 +361,0 @@ if (!result.quoted) delete result.quoted

{
"name": "ssh-config",
"description": "SSH config parser and stringifier",
"version": "4.0.2",
"version": "4.0.3",
"author": "Chen Yangjian (https://www.cyj.me)",

@@ -6,0 +6,0 @@ "repository": {

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