Browse files

Don't allow + in package names.

  • Loading branch information...
1 parent 793b6b7 commit 792adf0ddccfebfd4971b35eac454f5d666ae9ff @isaacs isaacs committed Nov 8, 2010
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

0 comments on commit 792adf0

Please sign in to comment.