Page 1 of 1

Integrator - OpenLDAP - Password with special characters

Posted: Tue Jul 07, 2020 11:30 pm
by jyoung
We use Integrator's OpenLDAP to authenticate users with Active Directory.

For the most part this works great, but we are running into an issue with users that have passwords with special characters like a parentheses.

The character in the password seems to blowing up the command.

The auth code looks like, where DN is the distinguished name that has been looked up via the SAMAccountName.

Code: Select all

#JSMXCMD := ('BIND HOST(&1) DN(&2) PASSWORD(&3)').Substitute( #LDAPServer #DN #wk_Password )
use builtin(JSMX_COMMAND) with_args(#JSMXHDLE #JSMXCMD) to_get(#JSMXSTS #JSMXMSG)
if (#COM_OWNER.Check( #JSMXSTS #JSMXMSG ) = False)
return
endif
Is there a way to escape the password or another way of dealing with password with special characters?

Thanks,
Joe

Re: Integrator - OpenLDAP - Password with special characters

Posted: Wed Jul 08, 2020 4:14 pm
by BrendanB
Joe,

I might be missing something, but i usually use double-quotes to escape things like passwords:

so using something like #jsmxcmd := ('BIND HOST(&1) DN(&2) PASSWORD("&3")').substitute(#Server #DN #Password)

usually that gets the password 'escaped'....

Code: Select all


#JSMXCMD := ('BIND HOST(&1) DN(&2) PASSWORD("&3")').Substitute( #LDAPServer #DN #wk_Password )
use builtin(JSMX_COMMAND) with_args(#JSMXHDLE #JSMXCMD) to_get(#JSMXSTS #JSMXMSG)
if (#COM_OWNER.Check( #JSMXSTS #JSMXMSG ) = False)
return
endif


Re: Integrator - OpenLDAP - Password with special characters

Posted: Thu Jul 09, 2020 2:23 am
by jyoung
Brendan,

I can't tell you how long I spent looking at that trying to figure out how to do this.
For whatever reason, I never thought I could just wrap it double quotes. :roll:

That was exactly what I needed. lol

Thanks for replying.
Joe