If token based authentication is mandatory a login failed entry is wr… - #31909
Conversation
Codecov Report
@@ Coverage Diff @@
## master #31909 +/- ##
=============================================
+ Coverage 47.83% 63.42% +15.58%
- Complexity 0 18499 +18499
=============================================
Files 109 1165 +1056
Lines 10379 69386 +59007
Branches 1264 1264
=============================================
+ Hits 4965 44006 +39041
- Misses 5045 25011 +19966
Partials 369 369
Continue to review full report at Codecov.
|
4bc44d4 to
b3a03a0
Compare
| throw new \InvalidArgumentException('$user cannot be empty'); | ||
| } | ||
| if (!$isTokenPassword && $this->isTokenAuthEnforced()) { | ||
| $this->logger->warning("Login failed: '$user' (Remote IP: '{$request->getRemoteAddress()}')", ['app' => 'core']); |
There was a problem hiding this comment.
should we also emit a symfony event ? I don't remember whether we also emit events on failure
There was a problem hiding this comment.
@sharidas are we logging symfony events for login failures as well ?
There was a problem hiding this comment.
Yes the login failures are addressed #31467. This method https://github.com/owncloud/core/blob/master/lib/private/User/Session.php#L1078 is called for the same.
There was a problem hiding this comment.
will emit the event ..... gimme a sec ...
b3a03a0 to
b6e0ec8
Compare
…itten to the log so that fail2ban can handle this case.
b6e0ec8 to
0bdf703
Compare
|
Tested against this branch just now.
Works for me. |
phil-davis
left a comment
There was a problem hiding this comment.
Tested as per my comment.
Others have reviewed the actual code.
|
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. |
…itten to the log so that fail2ban can handle this case.
Description
A log message is written in case a user does not login using an app password if 'token_auth_enforced' is set to true
Related Issue
https://github.com/owncloud/enterprise/issues/2473
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: