You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note however that these are only sporadic and that generally, from the client that makes Owncloud produce the above errors, everything works, so the client is configured correctly.
I have also logged the password being given to checkPassword() when this is logged and it is correct.
Server configuration
Operating system:
CentOS Linux 7.completely.up.to.date
Web server:
Apache
Database:
MySQL
PHP version:
5.4.16
ownCloud version: (see ownCloud admin page)
9.1.5
Updated from an older ownCloud or fresh install:
Updated
Where did you install ownCloud from:
EPEL
Signing status (ownCloud 9.0 and above):
Integrity checker has been disabled. Integrity cannot be verified.
The content of config/config.php:
Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.
Produced an empty file
List of activated apps:
Contacts
Calendar
Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No
I can't really say for sure. Given the nature of the debugging that I have done, I would say that any client could trigger the bug, but since I only use davdroid, that's all I can confirm for sure.
By default, owncloud does not allow login with e-mail, If a user try to login with e-mail, loginController firstly trying to login by using email as username and giving this error. The LoginController tries to get the username with the getByEmail function after the first unsuccessful attempt. If function returns a user it tries second login attempts with username and password.
IMHO, these logs are created by the first login attempt with email.
If you use username probably it will disappear. But maybe still we need to refactor auth logic. We are logging two times when failed login attempts with e-mail. One of them for only e-mail, other is for the username. Every time even successful login attempts, when a user used email in login, we are logging one time failed login attempt. For example, followings are logs for only one unsuccessful attempt with email, first one for email, other one is for username:
If a user try to login with e-mail, loginController firstly trying to login by using email as username and giving this error. The LoginController tries to get the username with the getByEmail function after the first unsuccessful attempt. If function returns a user it tries second login attempts with username and password.
So when the login string matches the pattern /.+@.+\..+$/ why not skip the first login attempt and jump directly to trying to find the user by e-mail address?
You could probably even refine the RE to be more strict about matching legal domain names on the RHS of the @.
Somehow we need to try only one login attempt to prevent unnecessary failed login log.
Maybe first we can check is user input a valid email. If it is we can try to call getByEmail function. If its output count greater than 0, we can try just login with email address user. If these conditions are not met, we can just try to login with original user input
It does not create any problem unless if a user's uid is the same as another user's email. We will try email login if only getByEmail function output count greater than 0.
same problem here we cannot login in to GUI at all {"reqId":"cuffTIUiLGzN3QYKJGqr","level":2,"time":"2018-06-26T22:51:05+00:00","remoteAddr":"x.x.x.x","user":"chris","app":"core","method":"GET","url":"\/apps\/files\/","message":"Login failed: 'owncloud' (Remote IP: 'xx.xx.xx.xx')"} {"reqId":"cuffTIUiLGzN3QYKJGqr","level":2,"time":"2018-06-26T22:51:06+00:00","remoteAddr":"xx,xx,xx,xx,","user":"--","app":"core","method":"GET","url":"\/apps\/files\/","message":"Login failed: 'owncloud' (Remote IP: 'xx.xx.xx.xx)"}
is there an update or fix for this problem it stopping us from using owncloud?
Can you guys who are still having the error confirm that you are using database users and logging in with email address ? This would align with #28234 (comment)
@djgrubson the bug above is only about bad login entries in the log, not about being unable to log in at all. Please raise a separate ticket with your environment details as it's likely a different issue.
Same applies for anyone here who cannot login at all, not just having the log filled with entries but being able to login.
This will help better analyze the issue without getting into misunderstandings due to talking about different issues. Thanks
also important to mention in your env, whether you are using fail2ban based on scanning for such entries, in which case bogus entries could prevent a login if they happen too often
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.
Activity
PVince81 commentedon Jun 29, 2017
Which client is causing this ? Only davdroid or any client ?
brianjmurrell commentedon Jun 29, 2017
I can't really say for sure. Given the nature of the debugging that I have done, I would say that any client could trigger the bug, but since I only use davdroid, that's all I can confirm for sure.
karakayasemi commentedon Jul 4, 2017
By default, owncloud does not allow login with e-mail, If a user try to login with e-mail, loginController firstly trying to login by using email as username and giving this error. The LoginController tries to get the username with the getByEmail function after the first unsuccessful attempt. If function returns a user it tries second login attempts with username and password.
IMHO, these logs are created by the first login attempt with email.
brianjmurrell commentedon Jul 4, 2017
I have changed my DavDroid configuration to use the bare username (i.e. LHS of my e-mail address). We'll see if these errors go away now.
karakayasemi commentedon Jul 4, 2017
If you use username probably it will disappear. But maybe still we need to refactor auth logic. We are logging two times when failed login attempts with e-mail. One of them for only e-mail, other is for the username. Every time even successful login attempts, when a user used email in login, we are logging one time failed login attempt. For example, followings are logs for only one unsuccessful attempt with email, first one for email, other one is for username:
{"reqId":"u3JkCI4HpYFVNxN0sreu","level":2,"time":"2017-07-04T12:43:18+00:00","remoteAddr":"192.168.157.1","user":"--","app":"core","method":"POST","url":"/core/index.php/login","message":"Login failed: '[email protected]' (Remote IP: '192.168.157.1')"}
{"reqId":"u3JkCI4HpYFVNxN0sreu","level":2,"time":"2017-07-04T12:43:19+00:00","remoteAddr":"192.168.157.1","user":"--","app":"core","method":"POST","url":"/core/index.php/login","message":"Login failed: 'ocadmin' (Remote IP: '192.168.157.1')"}
karakayasemi commentedon Jul 6, 2017
@brianjmurrell any update?
brianjmurrell commentedon Jul 7, 2017
Seems like that might have made the problem go away.
Any reason to not just
s/@.*$//from login names?karakayasemi commentedon Jul 7, 2017
No problem with the characters. The only problem occurs when login username matches with any user's email address.
brianjmurrell commentedon Jul 7, 2017
Ahhh. Reading back, I see what you are saying...
So when the login string matches the pattern
/.+@.+\..+$/why not skip the first login attempt and jump directly to trying to find the user by e-mail address?You could probably even refine the RE to be more strict about matching legal domain names on the RHS of the
@.karakayasemi commentedon Jul 7, 2017
I am willing to refactor loginController if we plan such things.
karakayasemi commentedon Jul 10, 2017
Somehow we need to try only one login attempt to prevent unnecessary failed login log.
Maybe first we can check is user input a valid email. If it is we can try to call getByEmail function. If its output count greater than 0, we can try just login with email address user. If these conditions are not met, we can just try to login with original user input
individual-it commentedon Jul 11, 2017
the username itself can look like an email address but in that case the user name login must be performed
karakayasemi commentedon Jul 11, 2017
It does not create any problem unless if a user's uid is the same as another user's email. We will try email login if only getByEmail function output count greater than 0.
30 remaining items
djgrubson commentedon Jun 26, 2018
same problem here we cannot login in to GUI at all
{"reqId":"cuffTIUiLGzN3QYKJGqr","level":2,"time":"2018-06-26T22:51:05+00:00","remoteAddr":"x.x.x.x","user":"chris","app":"core","method":"GET","url":"\/apps\/files\/","message":"Login failed: 'owncloud' (Remote IP: 'xx.xx.xx.xx')"} {"reqId":"cuffTIUiLGzN3QYKJGqr","level":2,"time":"2018-06-26T22:51:06+00:00","remoteAddr":"xx,xx,xx,xx,","user":"--","app":"core","method":"GET","url":"\/apps\/files\/","message":"Login failed: 'owncloud' (Remote IP: 'xx.xx.xx.xx)"}is there an update or fix for this problem it stopping us from using owncloud?
my vers is 10.0.8-1+1.1
PVince81 commentedon Jun 27, 2018
Can you guys who are still having the error confirm that you are using database users and logging in with email address ? This would align with #28234 (comment)
PVince81 commentedon Jun 27, 2018
@djgrubson the bug above is only about bad login entries in the log, not about being unable to log in at all. Please raise a separate ticket with your environment details as it's likely a different issue.
Same applies for anyone here who cannot login at all, not just having the log filled with entries but being able to login.
This will help better analyze the issue without getting into misunderstandings due to talking about different issues. Thanks
PVince81 commentedon Jun 27, 2018
also important to mention in your env, whether you are using fail2ban based on scanning for such entries, in which case bogus entries could prevent a login if they happen too often
djgrubson commentedon Jun 27, 2018
@PVince81 I have stopped fail2ban and now can login in into UI, thanks for pointing this out.
Thanks for help all.
djgrubson commentedon Jun 27, 2018
I also had auth_basic enabled in nginx which I heard doesn’t really work well with owncloud?
stale commentedon Sep 20, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.