Tag Archives: java,spring boot

Pin callback Base64 decryption error

Nail callback has been reporting errors

java.lang.IllegalArgumentException : Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value. Expected the discarded bits to be zero.
    at org.apache.commons . codec.binary.Base64 .validateCharacter(Base64. java:803 ) ~[commons-codec-1.14.jar!/:1.14]
    at org.apache.commons . codec.binary.Base64 .decode(Base64. java:482 ) ~[commons-codec-1.14.jar!/:1.14]
    at org.apache.commons . codec.binary.BaseNCodec .decode( BaseNCodec.java:481 ) ~[commons-codec-1.14.jar!/:1.14]
    at org.apache.commons . codec.binary.BaseNCodec .decode( BaseNCodec.java:465 ) ~[commons-codec-1.14.jar!/:1.14]
    at org.apache.commons . codec.binary.Base64 .decodeBase64(Base64. java:699 ) ~[commons-codec-1.14.jar!/:1.14]
    at com.dingtalk.oapi . lib.aes.DingTalkEncryptor .<init>( DingTalkEncryptor.java:61 ) ~[lippi-oapi-encrpt-0.0.1.jar!/:?]
 

Before debugging OK, I put it online. After thinking about it, I only upgraded springboot recently, from 2.1.6 to 2.3.0, and then rolled back the version. As expected, the parsing was successful, and no error was reported. I found that the upgrade of Base64 package from commons-codec-1.11 to commons-codec-1.13 was caused by adding a verification code

Then introduce commons-codec-1.11 into POM to solve the problem