Details
Assignee
UnassignedUnassignedReporter
Adam CameronAdam CameronLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Minor
Details
Details
Assignee
Unassigned
UnassignedReporter
Adam Cameron
Adam CameronLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Created 1 February 2015 at 15:47
Updated 7 February 2021 at 11:12
Copied from https://issues.jboss.org/browse/RAILO-3286
See http://blog.adamcameron.me/2014/12/fixing-cfscript-cfldap.html for full narrative. Warning: it is not kind to either Adobe or Railo
Detail:
CFLDAP does have over 20 attributes, which might seem a challenge here. But it needn't be if we group them sensibly:
result = queryLdap(actionParams, connectionParams, queryParams);
Three arguments are OK, I think. Each of those param arguments would be structs, which include the one or more of the following attributes of <cfldap>:
actionParams:
action = "action"
modifyType = "replace|add|delete"
connectionParams:
server = "server name"
password = "password"
port = "port number"
rebind = "yes|no"
referral = "number of allowed hops"
secure = "multifield security string"
timeout = "milliseconds"
username = "user name"
clientcert = "path to client certificate"
clientcertpassword = "password for the client certificate"
usetls = "true|false"
queryParams:
attributes = "attribute, attribute"
delimiter = "delimiter character"
dn = "distinguished name"
filter = "filter"
maxRows = "number"
returnAsBinary = "column name, column name"
scope = "scope"
separator = "separator character"
sort = "attribute[, attribute]..."
sortControl = "nocase|desc|asc"
start = "distinguished name"
startRow = "row number"
(those're just copied from the docs).
It'd actually be quite nice to be able to define an LDAP connection like one can a datasource. This stuff generally doesn't need to be defined in the code every time one needs to make a call, after all.
This makes the LDAP-querying functionality easy, predictable, and in-keeping with CFScript's existing corpus. And this should be a primary language design consideration when implementing anything: does it fit with the rest of the language? This is something neither the Railo nor the Adobe language designers (I am certain neither organisation as anyone in that role, actually) seem to consider.