This commit is contained in:
shoopea 2020-01-15 18:21:15 +08:00
parent 812690a973
commit a51300116e

7
job.go
View File

@ -4,6 +4,7 @@ import (
"archive/zip"
"bytes"
"compress/zlib"
"crypto/aes"
"crypto/sha256"
"encoding/binary"
"encoding/json"
@ -1568,7 +1569,7 @@ func jobGWithdraw(j Job) {
*/
b, _ := json.Marshal(p)
id, err := createJob(cacheObjSubType[`job_gwithdraw`], objJobPriority, userID64, 0, time.Unix(maxUnixTimestamp, 0).UTC(), b)
id, err := createJob(cacheObjSubType[`job_gwithdraw`], objJobPriority, j.UserID64, 0, time.Unix(maxUnixTimestamp, 0).UTC(), b)
sha256 := sha256.Sum256([]byte(s))
sha128 := sha256[:aes.BlockSize]
@ -1577,9 +1578,9 @@ func jobGWithdraw(j Job) {
in := make([]byte, 0)
buf := make([]byte, 8)
binary.LittleEndian.PutUint64(buf, uint64(id))
in = append(in, buf)
in = append(in, buf...)
binary.LittleEndian.PutUint64(buf, uint64(j.UserID64))
in = append(in, buf)
in = append(in, buf...)
out := make([]byte, len(in))
c.Encrypt(out, in)