[AWS] Bug in AWS.LDAP

Thomas Løcke thomas.granvej6 at gmail.com
Sun Jan 22 15:43:37 CET 2012


Hey all,

While working with the AWS.LDAP packages, I stumbled on bug: When trying to
bind to a non-existant server, you get a CONSTRAINT_ERROR exception,
instead of the proper LDAP_ERROR exception. This is because the
AWS.LDAP.Thin.Return_Code subtype range is too narrow.

The attached patch fixes the issue.

I've not made a reproducer, since the demos/test_ldap demo does the job
perfectly - simply change the Host string to a host that doesn't
exist/respond, and you will get the CONSTRAINT_ERROR. After you apply the
patch, you will instead get this:

    raised AWS.LDAP.LDAP_ERROR : Bind failed - [-1] Can't contact LDAP
server

Which obviously is much better.

Sincerely,
Thomas Løcke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/aws/attachments/20120122/0f79b93b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-constraint-error-when-bind-fails-due-to-bad-serv.patch
Type: text/x-patch
Size: 3055 bytes
Desc: not available
Url : /pipermail/aws/attachments/20120122/0f79b93b/attachment.bin 


More information about the AWS mailing list