milux / ctldap

LDAP Wrapper for ChurchTools
GNU General Public License v3.0
12 stars 7 forks source link

No Entries since CT Version 3.27 #10

Closed teleharry closed 6 years ago

teleharry commented 6 years ago

It seems, no entries are available since upgrading to Churchtools version 3.27 Perhaps, some changes with Slim-Framework: https://www.slimframework.com as stated in CT Changelogs

papenpa commented 6 years ago

I have informed the support of churchtools

teleharry commented 6 years ago

Just found it by myself. Somehow it returns since CT 3.27 systemd: Starting ctldap-test Service... node: ChurchTools-LDAP-Wrapper listening @ XXX node: Error while retrieving users: Session expired node: Error while retrieving groups: Session expired node: Unhandled rejection Session expired

So removing the "!" in ctldap.js on line 96 to: if (result.message === "Session expired" && !triedLogin) { does the trick.

Seems to work again.

teleharry commented 6 years ago

Version 3.27.7 mentions to fix it, but dooesnt: Feb 27 22:23:32 server-buero node: Admin bind DN: cn=root,ou=users,o=churchtools Feb 27 22:23:32 server-buero node: Authentication success Feb 27 22:23:32 server-buero node: SEARCH base object: o=churchtools scope: sub Feb 27 22:23:32 server-buero node: Filter: (objectclass=*) Feb 27 22:23:32 server-buero node: Unhandled rejection StatusCodeError: 401 - {"status":"error","message":"Session expired!"} Feb 27 22:23:32 server-buero node: at new StatusCodeError (/data/ctldap/ctldap-test/node_modules/request-promise-core/lib/errors.js:32:15) Feb 27 22:23:32 server-buero node: at Request.plumbing.callback (/data/ctldap/ctldap-test/node_modules/request-promise-core/lib/plumbing.js:104:33) Feb 27 22:23:32 server-buero node: at Request.RP$callback [as _callback] (/data/ctldap/ctldap-test/node_modules/request-promise-core/lib/plumbing.js:46:31) Feb 27 22:23:32 server-buero node: at Request.self.callback (/data/ctldap/ctldap-test/node_modules/request/request.js:186:22) Feb 27 22:23:32 server-buero node: at emitTwo (events.js:106:13) Feb 27 22:23:32 server-buero node: at Request.emit (events.js:191:7) Feb 27 22:23:32 server-buero node: at Request. (/data/ctldap/ctldap-test/node_modules/request/request.js:1163:10) Feb 27 22:23:32 server-buero node: at emitOne (events.js:96:13) Feb 27 22:23:32 server-buero node: at Request.emit (events.js:188:7) Feb 27 22:23:32 server-buero node: at IncomingMessage. (/data/ctldap/ctldap-test/node_modules/request/request.js:1085:12) Feb 27 22:23:32 server-buero node: at IncomingMessage.g (events.js:292:16) Feb 27 22:23:32 server-buero node: at emitNone (events.js:91:20) Feb 27 22:23:32 server-buero node: at IncomingMessage.emit (events.js:185:7) Feb 27 22:23:32 server-buero node: at endReadableNT (_stream_readable.js:974:12) Feb 27 22:23:32 server-buero node: at _combinedTickCallback (internal/process/next_tick.js:80:11) Feb 27 22:23:32 server-buero node: at process._tickCallback (internal/process/next_tick.js:104:9) Feb 27 22:23:32 server-buero node: Error while retrieving users: StatusCodeError: 401 - {"status":"error","message":"Session expired!"} Feb 27 22:23:32 server-buero node: Error while retrieving groups: StatusCodeError: 401 - {"status":"error","message":"Session expired!"}

teleharry commented 6 years ago

just used the pull (Fix login to churchtools #8) request, which works with version 3.27.7:

8

teleharry commented 6 years ago

3.27.8 fixed it, without these workarounds