Closed migerh closed 8 years ago
Thanks for finding the fix. I really need to update the ldapjs version to 1.0.0.
The only problem is -- it's working for me with 1.4.1.1 and, with all the changes to Meteor's node version and the new way of including binary builds for packages using binaries like ldapjs, I know I'll have hours of troubleshooting to get it working again.
I will fix it one day, but don't have the time right now to break-and-remake.
Yes, unencrypted ldap connections are not affected by this (our end2end tests work with an unencrypted local ldap server, that's why we didn't notice the issue right away). It's just encrypted connections that don't work anymore.
If someone else has this issue, feel free to copy our local version of this package with the upgraded ldapjs: https://github.com/4minitz/4minitz/tree/develop/packages/meteor-accounts-ldap
Ah yes ... you did say ldaps in the issue title. So a drop-in replacement of 1.0.0 solved the issue with no further code changes? I'll have a play around with it later today and, if it all works okay, will publish to atmosphere.
Well ... thank you for blazing the trail. I've updated the package (v0.7.0) to use ldapjs v1.0.0 and it's all working remarkably well (already deployed in a production app too).
Meteor: 1.4 babrahams:accounts-ldap: 0.6.1
I am using this package in connection with an ldaps server which worked fine until around we upgraded to Meteor 1.4. The error originates in ldapjs@0.7.1/lib/client/client.js:111:
This is the line in ldapjs mentioned above:
https://github.com/mcavage/node-ldapjs/blob/v0.7.1/lib/client/client.js#L108-L111
In line 108 of client.js you can see the switch between tls and plain net socket: if opts.secure use socket.socket, else use just socket. Meteor 1.4 included an upgrade of the nodejs bundled with Meteor from 0.10.x to 4.x. Apparently the tls module API changed between 0.10.x and 4.x. The tls socket no longer has a property called socket. This is already fixed since ldapjs 1.0.0, maybe even in 0.8.0.
To test my assumption I created a local copy of this package and bumped the ldapjs version to 1.0.0 and it fixed this issue.