Skip to content

Commit

Permalink
Merge pull request #1 from Xiangze-Li/master
Browse files Browse the repository at this point in the history
fix panic when using sign server
  • Loading branch information
fy0 authored Sep 8, 2023
2 parents 35f9ae5 + 7cec491 commit 490aecd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/gocq/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,11 @@ func signSubmit(uin string, cmd string, callbackID int64, buffer []byte, t strin
signServer += "/"
}
buffStr := hex.EncodeToString(buffer)
log.Infof("submit %v: uin=%v, cmd=%v, callbackID=%v, buffer-end=%v", t, uin, cmd, callbackID,
buffStr[len(buffStr)-10:])
buffEnd := buffStr
if len(buffEnd) > 10 {
buffEnd = buffEnd[len(buffEnd)-10:]
}
log.Infof("submit %v: uin=%v, cmd=%v, callbackID=%v, buffer-end=%v", t, uin, cmd, callbackID, buffEnd)
_, err := download.Request{
Method: http.MethodGet,
URL: signServer + "submit" + fmt.Sprintf("?uin=%v&cmd=%v&callback_id=%v&buffer=%v",
Expand Down

0 comments on commit 490aecd

Please sign in to comment.