1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00

use encodeURIComponent and replace encoded '@' value with un-encoded value

This commit is contained in:
James Newell 2015-07-13 12:15:18 +10:00
parent a9c749995a
commit ee6cf0eb9f

@ -8,7 +8,7 @@ var Logger = require('./logger')
var MyStreams = require('./streams')
var Utils = require('./utils')
var encode = function(thing) {
return thing.replace('/', '%2f');
return encodeURIComponent(thing).replace(/^%40/, '@');
};
module.exports = Storage