-
Notifications
You must be signed in to change notification settings - Fork 57
searchUser() function hard-codes ericsson domain component #94
Comments
Link to code in question. |
I agree this doesn't seem right. I don't know enough about how this code or how LDAP works to know how to fix it, though. |
Well I can answer the LDAP part: DC=domain,DC=example,DC=com scope would then be something like people or users so is probably okay as is. So if this function is used it probably needs to take the configured domain as a parameter. |
@mpumford What do you mean by "configured domain"? It would be great to see an example. |
I didn't read details of the code, but seeing the name of the function When you do a search, you will need to define a scope of where you want to look inside the LDAP server. You can view and LDAP directory as a mathematical tree. The text Usually, administrators configure the root of the tree as a domain name which will be only used inside the directory (here, in the code, the related domain is Edit: |
Well, this method doesn't seem to be really used: adrien@bureau:~/code/exchangecalendar$ grep --exclude-dir .git -rn searchUser
common/content/adutils.js:120: searchUserByEmail(mailID);
common/content/adutils.js:124: //this is why the mandatoryAttrib check is important in searchUser
common/content/adutils.js:243:function searchUser(searchString, wantedAttribs) {
common/content/adutils.js:260:function searchUserByEmail(mailID) {
common/content/adutils.js:272: searchUser(searchString, wantedAttribs);
common/content/adutils.js:277:function searchUserBySignum(signum) {
common/content/adutils.js:288: searchUser(searchString, wantedAttribs);
common/content/adutils.js:301: searchUserBySignum(mgrSignum);
common/content/adutils.js:315: searchUserBySignum(empSignum);
common/content/adutils.js:503: searchUserByEmail(searchemail); I suspect that was an helper for some specific Ericsson configuration. |
I was grepping for instances of
ericsson
for PR #92 and noticed something wonky.Take a look at this function in
chrome/content/adutils.js
Notice the line
gLdapOperation.searchExt("DC=ericsson,DC=se", gLdapServerURL.scope, searchString, wantedAttribs, 0, maxEntriesWanted);
; this does not look right, it should not be hard-coding the ericsson domain component like this, right?The text was updated successfully, but these errors were encountered: