Handle malformed encrypted requests without panics

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-07-13 08:03:18 +08:00
parent aebbc4b889
commit b1dfc68a0f
7 changed files with 135 additions and 91 deletions
+4 -1
View File
@@ -25,7 +25,10 @@ func authKey(ctx *gin.Context) {
if ss.CheckErr(err) {
return
}
dummyTokenDecrypted := encrypt.RSADecrypt(dummyToken)
dummyTokenDecrypted, err := encrypt.RSADecrypt(dummyToken)
if ss.CheckErr(err) {
return
}
// aesKey := dummyTokenDecrypted[0:16]
// authData, err := base64.StdEncoding.DecodeString(reqData.Get("auth_data").String())