joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

Fix "bind and search" on php8

Open tatankat opened this issue 2 years ago • 2 comments

Pull Request for Issue #38672 and #37060 .

I am aware this probably won't be accepted in Joomla 3 anymore, but I wanted to check this problem anyway and give those people a solution.

Remark for people needing this: please test your website using LDAP authentication on Joomla 4. It has some issues currently and the solutions need some testing. This ensures it will work once you need to upgrade to Joomla 4. Thanks! If you need the fixes, here they are:

  • #37959
  • #37962
  • #38388

Summary of Changes

As php8 returns an instance of LDAP\Connection instead of a resource, check for it.

Testing Instructions

Log in using LDAP "search and bind" method using php8

Actual result BEFORE applying this Pull Request

It fails: "Username and password do not match or you do not have an account yet."

Expected result AFTER applying this Pull Request

It succeeds

Documentation Changes Required

none

tatankat avatar Sep 13 '22 15:09 tatankat

Thank you very much Adjusted

jsfernando avatar Sep 14 '22 11:09 jsfernando

Thank you very much Adjusted

@jsfernando Does that mean you have successfully tested this pull request (PR)? If yes, please go to the pull request in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/38750 and mark your test result by using the blue "Test this" button at the top left corner, selecting your test result and then submit. Thanks in advance.

richard67 avatar Sep 14 '22 11:09 richard67

Thank you for this pull request. This will indeed not go into 3.x anymore, but it does help users who run into this issue. We do want to clean up our PR list and thus will close this here. Still, I'd like to thank you also for your other PRs which fixed issues in LDAP and introduced the tests in 4.x.

Hackwar avatar Oct 21 '22 12:10 Hackwar

Once again, php developers show their lack of seriousness. Modifying a function by mocking the consequences is bullshit.

edrobal avatar Jan 25 '23 11:01 edrobal