From b979e48792e8e05bed7f94ce712d4b8b4c9e445f Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 17 Jun 2019 15:21:38 +0200 Subject: Bump manifest format --- CHANGELOG | 2 ++ CloudronManifest.json | 5 +++-- DESCRIPTION.md | 2 +- package-lock.json | 2 +- package.json | 2 +- src/auth.js | 10 +++++----- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 09b33b8..f9879db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -85,3 +85,5 @@ [5.6.0] * Add SFTP support +[5.7.0] +* Update to latest app package manifest diff --git a/CloudronManifest.json b/CloudronManifest.json index 8ed67dc..dc463ba 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -10,10 +10,11 @@ "hosting", "server" ], - "version": "5.6.0", + "version": "5.7.0", "healthCheckPath": "/api/healthcheck", "httpPort": 3000, - "manifestVersion": 1, + "manifestVersion": 2, + "minBoxVersion": "4.1.4", "website": "https://git.cloudron.io/cloudron/surfer", "documentationUrl": "https://cloudron.io/documentation/apps/surfer/", "contactEmail": "support@cloudron.io", diff --git a/DESCRIPTION.md b/DESCRIPTION.md index 10a95f0..b57b004 100644 --- a/DESCRIPTION.md +++ b/DESCRIPTION.md @@ -1,4 +1,4 @@ -This app packages Surfer 5.5.0 +This app packages Surfer 5.7.0 ### Overview diff --git a/package-lock.json b/package-lock.json index 4c373b0..dccc4ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cloudron-surfer", - "version": "5.5.0", + "version": "5.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2e86673..7b8c0ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudron-surfer", - "version": "5.5.0", + "version": "5.7.0", "description": "Simple file server", "main": "server.js", "scripts": { diff --git a/src/auth.js b/src/auth.js index 80fa122..96f3045 100644 --- a/src/auth.js +++ b/src/auth.js @@ -12,8 +12,8 @@ var passport = require('passport'), HttpSuccess = require('connect-lastmile').HttpSuccess, webdavErrors = require('webdav-server').v2.Errors; -const LDAP_URL = process.env.LDAP_URL; -const LDAP_USERS_BASE_DN = process.env.LDAP_USERS_BASE_DN; +const LDAP_URL = process.env.CLOUDRON_LDAP_URL; +const LDAP_USERS_BASE_DN = process.env.CLOUDRON_LDAP_USERS_BASE_DN; const LOCAL_AUTH_FILE = path.resolve(process.env.LOCAL_AUTH_FILE || './.users.json'); const TOKENSTORE_FILE = path.resolve(process.env.TOKENSTORE_FILE || './.tokens.json'); const AUTH_METHOD = (LDAP_URL && LDAP_USERS_BASE_DN) ? 'ldap' : 'local'; @@ -79,16 +79,16 @@ passport.deserializeUser(function (id, done) { function verifyUser(username, password, callback) { if (AUTH_METHOD === 'ldap') { - var ldapClient = ldapjs.createClient({ url: process.env.LDAP_URL }); + var ldapClient = ldapjs.createClient({ url: process.env.CLOUDRON_LDAP_URL }); ldapClient.on('error', function (error) { console.error('LDAP error', error); }); - ldapClient.bind(process.env.LDAP_BIND_DN, process.env.LDAP_BIND_PASSWORD, function (error) { + ldapClient.bind(process.env.CLOUDRON_LDAP_BIND_DN, process.env.CLOUDRON_LDAP_BIND_PASSWORD, function (error) { if (error) return callback(error); var filter = `(|(uid=${username})(mail=${username})(username=${username})(sAMAccountName=${username}))`; - ldapClient.search(process.env.LDAP_USERS_BASE_DN, { filter: filter }, function (error, result) { + ldapClient.search(process.env.CLOUDRON_LDAP_USERS_BASE_DN, { filter: filter }, function (error, result) { if (error) return callback(error); var items = []; -- cgit v1.2.3