Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't allow + in package names.

  • Loading branch information...
commit 792adf0ddccfebfd4971b35eac454f5d666ae9ff 1 parent 793b6b7
@isaacs isaacs authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/utils/read-json.js
View
4 lib/utils/read-json.js
@@ -76,10 +76,10 @@ function processObject (opts, cb) { return function (er, json) {
throw e
}
json.name = json.name.trim()
- if (json.name.charAt(0) === "." || json.name.match(/[\/@\s]/)) {
+ if (json.name.charAt(0) === "." || json.name.match(/[\/@\s\+%]/)) {
var msg = "Invalid name: "
+ JSON.stringify(json.name)
- + " may not start with '.' or contain '/' or '@' or whitespace"
+ + " may not start with '.' or contain /, @, +, or whitespace"
, e = new Error(msg)
if (cb) return cb(e)
throw e
Please sign in to comment.
Something went wrong with that request. Please try again.