shuaidd / qywx

企业微信API封装
Apache License 2.0
138 stars 50 forks source link

Base64报错问题处理 #53

Open xuwen66971 opened 1 month ago

xuwen66971 commented 1 month ago

异常描述: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.

出现版本:4.4.2

异常原因与解决方案: commons-codec 版本为1.14,存在该bug,只要将该依赖版本换成1.15即可解决

<dependency>
    <groupId>com.github.shuaidd</groupId>
    <artifactId>qywx-spring-boot-starter</artifactId>
    <version>4.4.2</version>
    <exclusions>
        <exclusion>
            <artifactId>commons-codec</artifactId>
            <groupId>commons-codec</groupId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>1.15</version>
</dependency>