ep_ldapauth
ep_ldapauth copied to clipboard
Don't crash Etherpad is there's no settings
Hi
As shown below, if there's no ldap configuration in settings.json, Etherpad die. It should be just ignored.
root@etherpad-01-stg:/opt/etherpad-lite# rm /var/log/etherpad-lite/etherpad-lite.log; service etherpad restart; sleep 5; tail -f /var/log/etherpad-lite/etherpad-lite.log
Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient.
audited 8184 packages in 11.35s
found 1 low severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
Clearing minified cache...
Started Etherpad...
[2018-12-07 08:14:01.129] [DEBUG] console - Running on Node v11.2.0 (minimum required Node version: 6.9.0)
[2018-12-07 08:14:01.184] [INFO] console - All relative paths will be interpreted relative to the identified Etherpad base dir: /opt/etherpad-lite
[2018-12-07 08:14:01.186] [DEBUG] AbsolutePaths - Relative path "settings.json" can be rewritten to "/opt/etherpad-lite/settings.json"
[2018-12-07 08:14:01.187] [DEBUG] AbsolutePaths - Relative path "credentials.json" can be rewritten to "/opt/etherpad-lite/credentials.json"
[2018-12-07 08:14:01.187] [INFO] console - Settings loaded from: /opt/etherpad-lite/settings.json
[2018-12-07 08:14:01.191] [INFO] console - No credentials file found in /opt/etherpad-lite/credentials.json. Ignoring.
[2018-12-07 08:14:01.374] [ERROR] console - (node:6597) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.
[2018-12-07 08:14:31.142] [ERROR] console - TypeError: Cannot read property 'anonymousReadonly' of undefined
at Object.exports.authorize [as hook_fn] (/opt/etherpad-lite/node_modules/ep_ldapauth/ep_ldapauth.js:94:30)
at normalizedhook (/opt/etherpad-lite/src/static/js/pluginfw/hooks.js:15:27)
at hookCallWrapper (/opt/etherpad-lite/src/static/js/pluginfw/hooks.js:21:14)
at /opt/etherpad-lite/src/static/js/pluginfw/hooks.js:111:7
at next (/opt/etherpad-lite/src/static/js/pluginfw/hooks.js:46:5)
at Object.exports.mapFirst (/opt/etherpad-lite/src/static/js/pluginfw/hooks.js:52:3)
at Object.exports.aCallFirst (/opt/etherpad-lite/src/static/js/pluginfw/hooks.js:108:11)
at authorize (/opt/etherpad-lite/src/node/hooks/express/webaccess.js:30:11)
at exports.basicAuth (/opt/etherpad-lite/src/node/hooks/express/webaccess.js:84:3)
at Layer.handle [as handle_request] (/opt/etherpad-lite/src/node_modules/express/lib/router/layer.js:95:5)
^C
Best regards,