CFLDAP Timeout Attribute is not respected properly

Description

When using the cfldap tag with the timeout attribute specified it does not set the com.sun.jndi.ldap.read.timeout value. So if the LDAP server is down, it will just wait forever (or until the page timeout kicks in). On a related note it appears that the timeout value is only used for query operations.

You need to add: env.put("com.sun.jndi.ldap.read.timeout", timeout);

https://docs.oracle.com/javase/tutorial/jndi/newstuff/readtimeout.html

Activity

Show:

Zac Spitzer 29 July 2022 at 14:47

Zac Spitzer 13 May 2022 at 18:06

Zac Spitzer 7 February 2021 at 12:52

the default is 60s which is 60,000 in the code, so I think it’s just documentation which is wrong?

https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/tag/Ldap.java#L64

https://docs.lucee.org/reference/tags/ldap.html#attribute-timeout

PR to update documentation and always set timeout. (untested, I don’t have a LDAP server to test this with)

Eric Peterson 5 March 2020 at 23:07

Also, the timeout should be in milliseconds to match Adobe ColdFusion: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-j-l/cfldap.html

Fixed

Details

Assignee

Reporter

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

Sprint

Fix versions

Affects versions

Priority

Created 17 May 2018 at 14:54
Updated 24 August 2022 at 08:30
Resolved 24 August 2022 at 08:30