mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05:00
Prevent the server from crashing if a repo is accessed that the user does not have access to
https://github.com/verdaccio/verdaccio/pull/58 https://github.com/verdaccio/verdaccio/issues/56
This commit is contained in:
parent
6fb1dc2342
commit
a6fa0432ee
1 changed files with 5 additions and 1 deletions
|
@ -52,7 +52,11 @@ module.exports = function(config, auth, storage) {
|
|||
async.filterSeries(packages, function(package, cb) {
|
||||
auth.allow_access(package.name, req.remote_user, function(err, allowed) {
|
||||
setImmediate(function () {
|
||||
cb(err, allowed)
|
||||
if (err) {
|
||||
cb(null, false);
|
||||
} else {
|
||||
cb(err, allowed)
|
||||
}
|
||||
})
|
||||
})
|
||||
}, function(err, packages) {
|
||||
|
|
Loading…
Add table
Reference in a new issue