File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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) {
198198 authUser , err = models .GetUserByName (authUsername )
199199 if err != nil {
200200 if models .IsErrUserNotExist (err ) {
201- ctx .HandleText (http .StatusUnauthorized , "invalid credentials" )
201+ ctx .HandleText (http .StatusUnauthorized , fmt . Sprintf ( "invalid credentials from %s" , ctx . RemoteAddr ()) )
202202 } else {
203203 ctx .ServerError ("GetUserByName" , err )
204204 }
205205 return
206206 }
207207 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 ()) )
209209 return
210210 }
211211 }
@@ -231,7 +231,7 @@ func HTTP(ctx *context.Context) {
231231 }
232232
233233 if authUser == nil {
234- ctx .HandleText (http .StatusUnauthorized , "invalid credentials" )
234+ ctx .HandleText (http .StatusUnauthorized , fmt . Sprintf ( "invalid credentials from %s" , ctx . RemoteAddr ()) )
235235 return
236236 }
237237
You can’t perform that action at this time.
0 commit comments