ldapserver: fix crash when app not found
This commit is contained in:
@@ -510,6 +510,7 @@ async function userSearchSftp(req, res, next) {
|
||||
|
||||
const [error, app] = await safe(apps.getByFqdn(appFqdn));
|
||||
if (error) return next(new ldap.OperationsError(error.message));
|
||||
if (!app) return next(new ldap.OperationsError('Invalid app'));
|
||||
|
||||
// only allow apps which specify "ftp" support in the localstorage addon
|
||||
if (!safe.query(app.manifest.addons, 'localstorage.ftp.uid')) return next(new ldap.UnavailableError('Not supported'));
|
||||
|
||||
Reference in New Issue
Block a user