mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-11-26 15:17:00 +00:00
fix: mitigate Java4Shell in Base64 decoders and containers
This commit is contained in:
1 parent
b6922b152f
commit
8c07c6e657
17 files changed
+231
-22
No files matched your search
@@ -100,12 +100,12 @@ public class CommonUtils {
|
||||
Exception last = null;
|
||||
for (String candidate : new String[]{s, padBase64(s)}) {
|
||||
try {
|
||||
return new String(java.util.Base64.getUrlDecoder().decode(candidate), StandardCharsets.UTF_8);
|
||||
return new String(Base64Decoder.decodeUrl(candidate), StandardCharsets.UTF_8);
|
||||
} catch (Exception e) {
|
||||
last = e;
|
||||
}
|
||||
try {
|
||||
return new String(java.util.Base64.getDecoder().decode(candidate), StandardCharsets.UTF_8);
|
||||
return new String(Base64Decoder.decode(candidate), StandardCharsets.UTF_8);
|
||||
} catch (Exception e) {
|
||||
last = e;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user