mozilla / vinz-clortho

INACTIVE - http://mzl.la/ghe-archive - BrowserID Keymaster for LDAP enabled Identity Providers
16 stars 21 forks source link

Mozilla IDP failing on mozillafoundation.org addresses with exception missing required parameters: dn #101

Closed gene1wood closed 11 years ago

gene1wood commented 11 years ago
error: uncaughtException: missing required parameters: dn date=Tue Jul 02 2013 11:49:08 GMT-0400 (EDT), pid=26498, uid=501, gid=0, cwd=/opt/mozilla-idp-server/server, execPath=/usr/bin/node, version=v0.10.12, argv=[node, /opt/mozilla-idp-server/server/bin/clortho], rss=35143680, heapTotal=30107392, heapUsed=12415848, loadavg=[0.0732421875, 0.02685546875, 0.00634765625], uptime=76971.178768141, trace=[column=11, file=/opt/mozilla-idp-server/server/lib/auth.js, function=checkOpts, line=72, method=null, native=false, column=3, file=/opt/mozilla-idp-server/server/lib/auth.js, function=Object.exports.authUser, line=170, method=exports.authUser, native=false, column=18, file=/opt/mozilla-idp-server/server/routes.js, function=null, line=150, method=null, native=false, column=7, file=/opt/mozilla-idp-server/server/lib/throttle.js, function=null, line=35, method=null, native=false, column=13, file=node.js, function=process._tickCallback, line=415, method=_tickCallback, native=false], stack=[Error: missing required parwarn: Could not find user: censored@mozillafoundation.org
ameters: dn,     at checkOpts (/opt/mozilla-idp-server/server/lib/auth.js:72:11),     at Object.exports.authUser (/opt/mozilla-idp-server/server/lib/auth.js:170:3),     at /opt/mozilla-idp-server/server/routes.js:150:18,     at /opt/mozilla-idp-server/server/lib/throttle.js:35:7,     at process._tickCallback (node.js:415:13)]
info: running on http://0.0.0.0:3000
mostlygeek commented 11 years ago

This is a bug where if the user is not found in LDAP the error is not handled properly in routes.js line 170, and checkOpts fails because it never should have been run. We just need to handle the err in the callback and it should stop throwing an exception and crashing.

mostlygeek commented 11 years ago

A bit more information: it seems that in auth.js, the client.search() method needs to look in both o=com, dc=mozilla' and 'o=org, dc=mozilla' ... so maybe we'll just search indc=mozilla` to find all of them

gene1wood commented 11 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=889390