Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Don't allow + in package names.
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Nov 8, 2010
1 parent 793b6b7 commit 792adf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/read-json.js
Expand Up @@ -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
Expand Down

0 comments on commit 792adf0

Please sign in to comment.