Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
a822a31c
Commit
a822a31c
authored
Aug 15, 2014
by
Lukas Reschke
Browse files
Options
Downloads
Plain Diff
Merge pull request #10442 from owncloud/move-failed-logins
Move authentication failed logging to checkPassword
parents
1fff77f5
a82cd1ff
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/config.sample.php
+0
-3
0 additions, 3 deletions
config/config.sample.php
lib/base.php
+0
-7
0 additions, 7 deletions
lib/base.php
lib/private/user/manager.php
+5
-0
5 additions, 0 deletions
lib/private/user/manager.php
with
5 additions
and
10 deletions
config/config.sample.php
+
0
−
3
View file @
a822a31c
...
...
@@ -185,9 +185,6 @@ $CONFIG = array(
(watch out, this option can increase the size of your log file)*/
"log_query"
=>
false
,
/* Enable or disable the logging of IP addresses in case of webform auth failures */
"log_authfailip"
=>
false
,
/* Whether ownCloud should log the last successfull cron exec */
"cron_log"
=>
true
,
...
...
This diff is collapsed.
Click to expand it.
lib/base.php
+
0
−
7
View file @
a822a31c
...
...
@@ -849,13 +849,6 @@ class OC {
}
// logon via web form
elseif
(
OC
::
tryFormLogin
())
{
$error
[]
=
'invalidpassword'
;
if
(
OC_Config
::
getValue
(
'log_authfailip'
,
false
)
)
{
OC_Log
::
write
(
'core'
,
'Login failed: user \''
.
$_POST
[
"user"
]
.
'\' , wrong password, IP:'
.
$_SERVER
[
'REMOTE_ADDR'
],
OC_Log
::
WARN
);
}
else
{
OC_Log
::
write
(
'core'
,
'Login failed: user \''
.
$_POST
[
"user"
]
.
'\' , wrong password, IP:set log_authfailip=true in conf'
,
OC_Log
::
WARN
);
}
}
OC_Util
::
displayLoginPage
(
array_unique
(
$error
));
...
...
This diff is collapsed.
Click to expand it.
lib/private/user/manager.php
+
5
−
0
View file @
a822a31c
...
...
@@ -164,6 +164,11 @@ class Manager extends PublicEmitter implements IUserManager {
}
}
}
$remoteAddr
=
isset
(
$_SERVER
[
'REMOTE_ADDR'
])
?
$_SERVER
[
'REMOTE_ADDR'
]
:
''
;
$forwardedFor
=
isset
(
$_SERVER
[
'HTTP_X_FORWARDED_FOR'
])
?
$_SERVER
[
'HTTP_X_FORWARDED_FOR'
]
:
''
;
\OC
::
$server
->
getLogger
()
->
warning
(
'Login failed: \''
.
$loginname
.
'\' (Remote IP: \''
.
$remoteAddr
.
'\', X-Forwarded-For: \''
.
$forwardedFor
.
'\')'
,
array
(
'app'
=>
'core'
));
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment