We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c1423b commit 46bc3b1Copy full SHA for 46bc3b1
core/src/main/java/ch/cyberduck/core/io/Checksum.java
@@ -80,8 +80,8 @@ public static Checksum parse(final String hash) {
80
if(StringUtils.isBlank(hash)) {
81
return Checksum.NONE;
82
}
83
- // Check for Base64 with propper padding
84
- if(hash.matches("^[A-Za-z0-9+/]+=*$") && hash.length() % 4 == 0) {
+ // Check for Base64 with proper padding
+ if(hash.matches("^[A-Za-z0-9+/]+={0,2}$") && hash.length() % 4 == 0) {
85
final Checksum result = parseHex(Hex.encodeHexString(Base64.decodeBase64(hash)));
86
if(result != Checksum.NONE) {
87
return new Checksum(result.algorithm, result.hex, hash);
0 commit comments