File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -198,14 +198,14 @@ func HTTP(ctx *context.Context) {
198
198
authUser , err = models .GetUserByName (authUsername )
199
199
if err != nil {
200
200
if models .IsErrUserNotExist (err ) {
201
- ctx .HandleText (http .StatusUnauthorized , "invalid credentials" )
201
+ ctx .HandleText (http .StatusUnauthorized , fmt . Sprintf ( "invalid credentials from %s" , ctx . RemoteAddr ()) )
202
202
} else {
203
203
ctx .ServerError ("GetUserByName" , err )
204
204
}
205
205
return
206
206
}
207
207
if authUser .ID != token .UID {
208
- ctx .HandleText (http .StatusUnauthorized , "invalid credentials" )
208
+ ctx .HandleText (http .StatusUnauthorized , fmt . Sprintf ( "invalid credentials from %s" , ctx . RemoteAddr ()) )
209
209
return
210
210
}
211
211
}
@@ -231,7 +231,7 @@ func HTTP(ctx *context.Context) {
231
231
}
232
232
233
233
if authUser == nil {
234
- ctx .HandleText (http .StatusUnauthorized , "invalid credentials" )
234
+ ctx .HandleText (http .StatusUnauthorized , fmt . Sprintf ( "invalid credentials from %s" , ctx . RemoteAddr ()) )
235
235
return
236
236
}
237
237
You can’t perform that action at this time.
0 commit comments