Permalink
Browse files

Escape URI parts when making requests.

  • Loading branch information...
1 parent 7f0596f commit 793b6b7ac50256bc4b3dfed10c49abb7277d89e6 @isaacs isaacs committed Nov 8, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/utils/registry/request.js
@@ -23,6 +23,7 @@ function request (method, where, what, cb) {
var authRequired = what && !where.match(/^\/?adduser\/org\.couchdb\.user:/)
|| where.match(/^\/?adduser\/org\.couchdb\.user:([^\/]+)\/-rev/)
|| method === "DELETE"
+ where = where.split("/").map(encodeURIComponent).join("/")
where = url.resolve(npm.config.get("registry"), where)
var u = url.parse(where)
, proxyConfig = npm.config.get("proxy")

0 comments on commit 793b6b7

Please sign in to comment.