Closed feeloo007 closed 8 years ago
I can't immediately see how that line of code is failing. Weird.
No ... wait a minute. It looks, from that error, like you've got a function as your serverDn
. That won't work. You need to use this in server code:
LDAP.generateSettings = function (request) {
return null; // replace null with an object that represents your settings
}
Take a look at the example code at the bottom of the README.
Thank you Jack.
Unfortunately, I have got same issue using LDAP.generateSettings.
Il will test with a fresh clean meteor's app.
Thanks for your help.
Hi Jack,
Issue is correlated with the meteor's release (perhaps with ECMA script 6 support).
With older meteor version (1.1.0.2, used in meteor-accounts-ldap example from fresh git clone).
> l = [ 'test1' ]
["test1"]
> for ( k in l ) { console.log( k ) }
0
With latest version (meteor update on meteor-accounts-ldap example)
> l = [ 'test1' ]
["test1"]
> for ( k in l ) { console.log( k ) }
0
diff
equals
Best regards
Hey ... thanks for hunting that down. That's certainly the problem and it seems pretty fixable.
Looks like a bug in the ECMAScript 2015 support -- I wouldn't have thought that was expected behaviour.
I tested this and couldn't reproduce it. I don't think there's a problem with the ecmascript package after all. Something else is going on.
Sorry, I missed the notification.
It's really strange. I will test with a clean meteor 1.2.1 if I got same issue with for in.
Have a nice week end
Hi Jack,
I found issue's origin.
I use mickaelfm:vermongo in my project.
With this package installed, if auth fails with NoSushObjectError, the split error occurs.
Without this package installed, if auth fails with NoSushObjectError, the split doesn't occurs.
I will made an issue in mickaelfm:vermongo's github repository.
Thanks for your help !
Nice day
Philippe
Hey Philippe,
Thanks for sharing the cause of the issue. Appreciate it.
The issue was quite a baffling one!
Brent
Thank you for your time Jack ! And your great packages :-)
Have a nice day
Philippe
Hi,
I have an issue with LDAP._bind.
I'm using Meteor 1.2.1 and meteor-accounts-ldap 0.4.0.
My settings file is :
I got this error :
The failing code is :
In meteor shell, LDAP._settings().serverDn.split(/,?DC=/).slice(1).join('.') could be splitted.
But, if I made it in the loop, split method error is signaled.
Best regards
Philippe