Commit b979e487 by Johannes Zellner

Bump manifest format

1 parent df0c8653
...@@ -85,3 +85,5 @@ ...@@ -85,3 +85,5 @@
[5.6.0] [5.6.0]
* Add SFTP support * Add SFTP support
[5.7.0]
* Update to latest app package manifest
...@@ -10,10 +10,11 @@ ...@@ -10,10 +10,11 @@
"hosting", "hosting",
"server" "server"
], ],
"version": "5.6.0", "version": "5.7.0",
"healthCheckPath": "/api/healthcheck", "healthCheckPath": "/api/healthcheck",
"httpPort": 3000, "httpPort": 3000,
"manifestVersion": 1, "manifestVersion": 2,
"minBoxVersion": "4.1.4",
"website": "https://git.cloudron.io/cloudron/surfer", "website": "https://git.cloudron.io/cloudron/surfer",
"documentationUrl": "https://cloudron.io/documentation/apps/surfer/", "documentationUrl": "https://cloudron.io/documentation/apps/surfer/",
"contactEmail": "support@cloudron.io", "contactEmail": "support@cloudron.io",
......
This app packages Surfer <upstream>5.5.0</upstream> This app packages Surfer <upstream>5.7.0</upstream>
### Overview ### Overview
......
{ {
"name": "cloudron-surfer", "name": "cloudron-surfer",
"version": "5.5.0", "version": "5.7.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
......
{ {
"name": "cloudron-surfer", "name": "cloudron-surfer",
"version": "5.5.0", "version": "5.7.0",
"description": "Simple file server", "description": "Simple file server",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
......
...@@ -12,8 +12,8 @@ var passport = require('passport'), ...@@ -12,8 +12,8 @@ var passport = require('passport'),
HttpSuccess = require('connect-lastmile').HttpSuccess, HttpSuccess = require('connect-lastmile').HttpSuccess,
webdavErrors = require('webdav-server').v2.Errors; webdavErrors = require('webdav-server').v2.Errors;
const LDAP_URL = process.env.LDAP_URL; const LDAP_URL = process.env.CLOUDRON_LDAP_URL;
const LDAP_USERS_BASE_DN = process.env.LDAP_USERS_BASE_DN; 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 LOCAL_AUTH_FILE = path.resolve(process.env.LOCAL_AUTH_FILE || './.users.json');
const TOKENSTORE_FILE = path.resolve(process.env.TOKENSTORE_FILE || './.tokens.json'); const TOKENSTORE_FILE = path.resolve(process.env.TOKENSTORE_FILE || './.tokens.json');
const AUTH_METHOD = (LDAP_URL && LDAP_USERS_BASE_DN) ? 'ldap' : 'local'; const AUTH_METHOD = (LDAP_URL && LDAP_USERS_BASE_DN) ? 'ldap' : 'local';
...@@ -79,16 +79,16 @@ passport.deserializeUser(function (id, done) { ...@@ -79,16 +79,16 @@ passport.deserializeUser(function (id, done) {
function verifyUser(username, password, callback) { function verifyUser(username, password, callback) {
if (AUTH_METHOD === 'ldap') { 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) { ldapClient.on('error', function (error) {
console.error('LDAP error', 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); if (error) return callback(error);
var filter = `(|(uid=${username})(mail=${username})(username=${username})(sAMAccountName=${username}))`; 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); if (error) return callback(error);
var items = []; var items = [];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!