錯誤內容:
{"timestamp":"2021-10-09 17:02:32","status":500,"error":"Internal Server Error","message":"Given final block not properly padded. Such issues can arise if a bad key is used during decryption.","path":"/system/security/cryptography/aes/decrypt"}
解密文本:
tSs27uklYbaWT6uZfp+2CQ==
其他描述:
1、IIS服務器端訪問解密接口,Content-Type:application/x-www-form-urlencoded;charset=utf-8
2、參數:content
3、實際請求消息中:content=tSs27uklYbaWT6uZfp+2CQ==
4、導致的結果是,服務器接口端接收到的content值為:tSs27uklYbaWT6uZfp 2CQ==(中間缺少了個+)
5、解決方法:服務器端對content內容進行UrlEncode
6、原因:表單傳參數時,加號“+”,被認為錯誤轉化