#48143 Password is not correctly passed to perl command line tools if it contains shell special characters.
Closed: wontfix None Opened 8 years ago by dmytroleonenko.

Hello
when using
./fixup-memberof.pl -D 'cn=Directory manager' -b 'dc=example,dc=com' -v -w -
pas$w!ord

the script ends up with:
Bind Password:
ldap_bind: Invalid credentials (49)
Failed to add task entry "cn=memberOf_fixup_2015_4_6_8_26_18, cn=memberOf task, cn=tasks, cn=config" error (49)

after changing Directory Manager's password to PassWd1Dm the problem has gone:
ldap_initialize( ldap://example.com:389 )
Successfully added task entry "cn=memberOf_fixup_2015_4_6_8_52_55, cn=memberOf task, cn=tasks, cn=config"


I think you will still run into problems if the password contains ' or . Instead, you might want to use the shellEscape function in DSUtil.pm.

git patch file (master) -- revised to use shellEscape to escape special characters
0001-Ticket-48143-Password-is-not-correctly-passed-to-per.2.patch

Reviewed by Rich (Thank you!!)

Pushed to master:
d85ef49..e7c8da6 master -> master
commit e7c8da6

Reviewed by Rich (Thank you!!)

Pushed to 389-ds-base-1.2.11:
ba48827..68b1039 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit 68b1039

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.2.11.33

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1474

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata