Only allow ftp access for apps which support it

This commit is contained in:
Johannes Zellner
2019-03-19 20:47:57 -07:00
parent 71cb5c579d
commit 77ed177855
+3
View File
@@ -524,6 +524,9 @@ function userSearchProftpd(req, res, next) {
apps.getByFqdn(appFqdn, function (error, app) {
if (error) return next(new ldap.OperationsError(error.toString()));
// only allow apps which specify "ftp" support in the localstorage addon
if (!app.manifest.addons.localstorage || !app.manifest.addons.localstorage.ftp) return next(new ldap.UnavailableError('Not supported'));
users.getByUsername(username, function (error, user) {
if (error) return next(new ldap.OperationsError(error.toString()));