mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01: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
@ -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…
Reference in New Issue
Block a user