Repository navigation
Description
Hi there!
Steps to reproduce
- Use current master of core (99cae7c) and of the user_ldap app (384180)
- configure the user_ldap app (without touching any advanced or expert options)
- try to log into ownCloud using the credentials of a user located on the LDAP server
Expected behaviour
The user should be logged into owncloud.
Actual behaviour
ownCloud throws a HTTP 500 and the user is not logged in. The log says:
{"reqId":"kQg7yuKsz3YUayMpxAGO","level":3,"time":"2017-07-20T12:54:52+00:00","remoteAddr":"192.168.33.1","user":"7c1247da-d30e-1036-8350-cd5127ce8b3b","app":"PHP","method":"POST","url":"\/index.php\/login?user=user333",
"message":"Call to a member function getUID() on null at \/var\/www\/owncloud\/core\/Controller\/LoginController.php#207"}
I'm filing this issue here instead of user_ldap because the exception is raised in core code. I'll also do a PR with a fix proposal shortly.
For the sake of completeness: I already mentioned this bug earlier in #26065 (here).
Server configuration
Operating system: Ubuntu 14.04.5 LTS
Web server: Apache 2.4.7-1ubuntu4.16
Database: mysql-server-5.5 5.5.55-0ubuntu0.14.04.1
PHP version: 5.6.31-1
ownCloud version: current master
Updated from an older ownCloud or fresh install: fresh install
Where did you install ownCloud from: git
Signing status (ownCloud 9.0 and above): (I think I can't do this because I've installed from git?)
The content of config/config.php: https://gist.github.com/fredreichbier/312e678bd5c682b6772bcbd9e9628bef
List of activated apps:
Enabled:
- comments: 0.3.0
- dav: 0.3.0
- federatedfilesharing: 0.3.0
- federation: 0.1.0
- files: 1.5.1
- files_external: 0.7.0
- files_sharing: 0.10.0
- files_trashbin: 0.9.0
- files_versions: 1.3.0
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- updatenotification: 0.2.1
- user_ldap: 0.9.1
Disabled:
- encryption
- testing
- theme-example
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
Client configuration
Browser: Chrome 52
Operating system: Arch Linux
Logs
ownCloud log (data/owncloud.log)
see above
Activity
PVince81 commentedon Jul 24, 2017
@jvillafanez known issue ?
jvillafanez commentedon Jul 24, 2017
I haven't checked master, but as far as I know, stable10 should work. Any change in core that could cause this issue? I'm not aware of any change on the LDAP side.
fredreichbier commentedon Jul 24, 2017
@karakayasemi explains the root cause here -- just wanted to add that login via user_ldap indeed works on current stable10 (b2b1f18), but not on master.
davitol commentedon Jul 25, 2017
I was able to reproduce it too:
As said, it works in stable10
@jvillafanez Can you please have a look?
jvillafanez commentedon Jul 25, 2017
I guess I finally got where the problem is: during the userSession->login(...) you use a login name + password as parameters, then you use the same login name to get the user instance from the user manager. That's where the problem is, because the user manager expects an uid not a login name.
DB users usually have the same uid and login name, but that's not the case for LDAP.
karakayasemi commentedon Jul 25, 2017
@jvillafanez thanks to you, now I understand the current problem also. Anyway, seems related PR is solving the issue.
karakayasemi commentedon Aug 9, 2017
We can close this issue. Fix is merged: #28450
lock commentedon Jul 30, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.