mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #359] Binding to LDAP with authentication breaks LDAP_contacts (anonymous works) #307
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#307
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @robert-winkler on GitHub (Oct 25, 2019).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/359
Originally assigned to: @jasonmunro, @IrAlfred on GitHub.
Switching from anonymous to authenticated binding breaks LDAP contacts
I store my contacts in OpenLDAP. Anonymous binding to the DB to read the contacts in cypht works. However, when changing to
auth=truein theldap.ini, the connection to the LDAP server breaks. There is no error message.I tried both: 1) entering the login data in the
ldap.ini("admin","cn=admin", ..); and 2) leavingadmin='' path='' blankand configuring the access data in the Web-Interface.I consider this issue critical, since anonymous binding to an LDAP server should be disallowed.
The admin connection to the LDAP server and reading/writing entries using phpLDAPadmin works; thus the configuration of the server looks fine.
Version and Environment
Rev: I used the install script. There is no obvious version, but this might help:
1664 Jul 19 20:04 composer.json
OS: Ubuntu 18.04.3 LTS
PHP: PHP 7.2.19-0ubuntu0.18.04.2 (cli) (built: Aug 12 2019 19:34:28) ( NTS )
@jasonmunro commented on GitHub (Nov 12, 2019):
Sounds like a bug. Sorry for the late response. I will check into it as soon as I can (also adding this as a must fix before the next RC release). Thanks for the report!
@jasonmunro commented on GitHub (Nov 13, 2019):
This seems to be working for me here, but there could definitely still be a bug. One thing I noticed is that when I set my credentials via the ini file, I need to setup the entire dn, but when doing so via the settings page only the username and the code builds the dn.
For example my username in the ini file set to "cn=admin,dc=foo,dc=com" translates to just "admin" when setting the username using the settings page.
Best way to troubleshoot this is to make the following code changes locally, then load the contacts page, and check wherever PHP errors are logged (also you must be in debug mode for the errors to be logged).
Code changes to debug: https://gist.github.com/jasonmunro/2afcaae292757c87e7c87a6593b8fc42
Info on debug mode: https://github.com/jasonmunro/cypht/wiki/Troubleshooting-Login-Issues#debug-mode
Hope that helps!
@robert-winkler commented on GitHub (Nov 14, 2019):
Hi Jason,
I applied the patch and run> php /usr/local/share/cypht/scripts/config_gen.php.
opened mail-debug.
The admin is set in the Site settings.
and looked for the error.log file after trying to add a contact in LDAP_contacts.
=> no error! (I created a fresh file and it remains empty..)
setting the "cn=admin,dc=foo,dc=com" (my domain instead of foo) did not work either.
using the same parameters with phpLDAPadmin works (i.e. the configuration of the LDAP server should be o.k.).
any ideas?
Best, Robert
On Wed, 13 Nov 2019 15:39:59 -0800 jasonmunro/cypht reply@reply.github.com said
Links:
[1] https://gist.github.com/jasonmunro/2afcaae292757c87e7c87a6593b8fc42
[2] https://github.com/jasonmunro/cypht/wiki/Troubleshooting-Login-Issues#debug-mode
[3] https://github.com/jasonmunro/cypht/issues/359?email_source=notifications&email_token=ACMIC3IAA4DEGCNAVRQS34LQTSF47A5CNFSM4JFHVDJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEAB4II#issuecomment-553655841
[4] https://github.com/notifications/unsubscribe-auth/ACMIC3MZ3VWPSNIWIPBIRXLQTSF47ANCNFSM4JFHVDJA
@jasonmunro commented on GitHub (Nov 14, 2019):
Robert,
Thank you for the follow up. Every page load should log information in the PHP error log location when in debug mode, so if there is nothing in the log I think debug mode might not be enabled or PHP logging is going somewhere else (?)
@robert-winkler commented on GitHub (Nov 14, 2019):
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi Jason,
This is php7.2 on an Ubuntu 18.04 LTS Linux (nothing exotic ;-))
and error logs should go into this dirs and I also searched on
the file system. However, maybe I need to configure the php.ini.
I'm investigating this ASAP (hopefully today).
Best regards,
Robert
Jason Munro notifications@github.com wrote:
Robert Winkler
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRujpWQ/v2xE00/+4Z82ycOpoE0FwUCXc1ikgAKCRB82ycOpoE0
FxDkAPwJHQzEmuIH5MSpG5zFjHSrfdpsVcIWT5Te4JhX35TH1AEA5G56RmolHHDU
IZSiyqcfutsATmqON9UN8v9yET5uMQ4=
=gGhP
-----END PGP SIGNATURE-----
@marclaporte commented on GitHub (Sep 19, 2020):
@robert-winkler we need your logs :-)
@robert-winkler commented on GitHub (Dec 17, 2020):
Hi, I don't get a PHP error. This is what I did:
error_log = /var/log/php_errors.login
/etc/php/7.3/apache2/php.iniservice apache2 restart/var/log/php_errors.log...@jasonmunro commented on GitHub (Mar 10, 2021):
@robert-winkler I have every reason to believe this issue is real and we have a bug. However we need to move forward with a release so I'm going to keep this open but remove it as a blocker.
@marclaporte commented on GitHub (May 7, 2024):
@robert-winkler
Please retest, as a lot has changed since you reported this issue. Notably, we now have 3 active branches and recently released Cypht 2.0.0
@IrAlfred commented on GitHub (Sep 5, 2025):
While working on this issue, I discovered a new problem: I am unable to add LDAP contacts. Furthermore, when switching to LDAP authentication, the logs show "LDAP AUTH failed," which seems to be the root cause for the current issue, so I am now focusing on fixing these errors.
@IrAlfred commented on GitHub (Sep 24, 2025):
Hello @robert-winkler,
We have good news !
This issue has been investigated and resolved. The bugs preventing authenticated LDAP binding for contacts has been patched in the current master branch.
We would greatly appreciate it if you could retest this fix. You can do so by installing the application from the master branch. Confirming that it works in your environment would be very helpful.
If you're unable to test from the master branch, no problem. The fix will also be included in the next official release https://github.com/cypht-org/cypht/issues/1624. Please let us know your findings if you do get a chance to retest.
Thank you for your contribution.