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
@@ -33,7 +33,10 @@ func handshake(ctx *gin.Context) {
return
}
decryptedData := encrypt.RSADecrypt(data)
decryptedData, err := encrypt.RSADecrypt(data)
if ss.CheckErr(err) {
return
}
params, err := url.ParseQuery(string(decryptedData))
if ss.CheckErr(err) {