ldapserver: fix crash when app not found

This commit is contained in:
Girish Ramakrishnan
2025-10-03 11:55:20 +02:00
parent a6355e1945
commit 3364e5c876

View File

@@ -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'));