From a11ce38747caede4ec517939c2e20bda22c57a55 Mon Sep 17 00:00:00 2001 From: "arraykeys@gmail.com" Date: Tue, 3 Apr 2018 17:34:33 +0800 Subject: [PATCH] Signed-off-by: arraykeys@gmail.com --- utils/structs.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/structs.go b/utils/structs.go index 764622d..e7f3958 100644 --- a/utils/structs.go +++ b/utils/structs.go @@ -280,7 +280,11 @@ func (ba *BasicAuth) checkFromURL(userpass, ip, target string) (err error) { } else { err = fmt.Errorf("token error") } - err = fmt.Errorf("auth fail from url %s,resonse code: %d, except: %d , %s , %s", URL, code, ba.authOkCode, ip, string(body)) + b := string(body) + if len(b) > 50 { + b = b[:50] + } + err = fmt.Errorf("auth fail from url %s,resonse code: %d, except: %d , %s , %s", URL, code, ba.authOkCode, ip, b) } if err != nil && tryCount < ba.authRetry { log.Print(err)