You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value #1610
java.lang.IllegalArgumentException: Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value
at org.apache.commons.codec.binary.Base64.validateCharacter(Base64.java:798)
at org.apache.commons.codec.binary.Base64.decode(Base64.java:477)
at org.apache.commons.codec.binary.BaseNCodec.decode(BaseNCodec.java:411)
at org.apache.commons.codec.binary.BaseNCodec.decode(BaseNCodec.java:395)
at org.apache.commons.codec.binary.Base64.decodeBase64(Base64.java:694)
at me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil.(WxCpCryptUtil.java:47)
changed the title [-]weixin-java-cp[/-][+]Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value[/+]on Jun 11, 2020
Activity
13756289007 commentedon Jun 11, 2020
楼主解决了吗? 我也遇到这个问题了 一开始以为是JDK的问题 但是换了好多个版本都是一样的问题
binarywang commentedon Jun 11, 2020
#1454 猜测跟这个有关系
binarywang commentedon Jun 11, 2020
请检查 commons-codec 版本,不能用 1.13的
[-]weixin-java-cp[/-][+]Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value[/+]binarywang commentedon Jun 11, 2020
wiki里常见问题里有说明过这个问题
binarywang commentedon Jun 11, 2020
准备换用guava替代commons-codec实现base64解码
🎨 #1610 换用guava的相应方法实现base64解码,避免因commons-codec版本问题导致解码异常
refeccd commentedon Nov 21, 2020
这个替换也没替换完啊,3.9.0里WxCryptUtil、WxMaCryptUtils、WxPayRefundNotifyResult、EntPayServiceImpl、还是用的 commons-codec
binarywang commentedon Nov 21, 2020
谁说要完全替换的,只是关于base64编码的代码