user-otp icon indicating copy to clipboard operation
user-otp copied to clipboard

breaks owncloud if used in conjunction with LDAP

Open billyburly opened this issue 11 years ago • 6 comments

I have LDAP auth enabled. If I try installing the OTP app, it causes the LDAP auth app to throw a php error. This happens when trying to view any ownCloud page.

[Wed Jul 02 11:12:36.090504 2014] [proxy_fcgi:error] [pid 524:tid 140533089060608] [client xxx.xxx.xxx.xxx:13268] AH01071: Got error 'PHP message: PHP Fatal error:  Call to a member function hasPagedResultSupport() on a non-object in /usr/share/webapps/owncloud/apps/user_ldap/lib/connection.php on line 65\n'

billyburly avatar Jul 02 '14 15:07 billyburly

LDAP enabled - Connected to Active Directory, installation of OTP app works fine, but when i try to go to the ADMIN panel after installation, the page keeps loading and stays blank. After uninstall of OTP app everything returns to normal.

roru69 avatar Nov 12 '14 07:11 roru69

I have the same issue.

Gentoo OwnCloud 7.0.4 Apache 2.2.27 PHP 5.3.29 user_otp 2.5.1

I am willing to try any patches given.

toaster avatar Jan 16 '15 08:01 toaster

Same issue present with Owncloud running on FreeBSD.

Ashaman- avatar Feb 06 '15 18:02 Ashaman-

Same here: CentOS 7 OwnCloud 7.0.4 Apache 2.4.6 PHP 5.4.16 user_otp 2.5

fnerdwq avatar Feb 08 '15 15:02 fnerdwq

Same issue. Here's what happens if I check my code while the user_otp app is in my apps directory.

image

(I kept trying to just paste the text into this post and it refused to stop stripping out the PHP even when I surrounded it in 1 or 3 backticks. Sorry.)

The text "otp" does not appear in the user_ldap.php file, which tells me some kind of janky substitution is being attempted by the user_otp app. If I delete the user_otp directory my ownCloud installation starts working normally again.

jdkruzr avatar Aug 12 '15 17:08 jdkruzr

Similar issue on OpenBSD-5.6/PHP-5.4/ownCloud-8.1.1 in a chroot, with 884ba7ddd8027b604252b929cd08d6569d0afc8e.

[Thu Sep  3 12:41:08 2015] [error] PHP Fatal error:  Call to a member function isCached() on a non-object in /owncloud/apps/user_ldap/user_ldap.php on line 198

The code in user_ldap.php looks like

/**
 * check if a user exists
 * @param string $uid the username
 * @return boolean
 * @throws \Exception when connection could not be established
 */
public function userExists($uid) {
    if($this->access->connection->isCached('userExists'.$uid)) { /* <- this is line 198 */
        return $this->access->connection->getFromCache('userExists'.$uid);
    }
    //getting dn, if false the user does not exist. If dn, he may be mapped only, requires more checking.
    $user = $this->access->userManager->get($uid);

shtrom avatar Sep 03 '15 10:09 shtrom