mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-10 15:37:28 +00:00
fix(FsTool): 收窄 parseFileNameFromContentDisposition 中的 catch 异常类型
将 catch(Exception) 改为 catch(IllegalArgumentException), 只捕获 URLDecoder.decode 在遇到非法百分比编码时抛出的具体异常。
This commit is contained in:
@@ -448,7 +448,7 @@ public class FsTool extends PanBase {
|
||||
if (m1.find()) {
|
||||
try {
|
||||
return URLDecoder.decode(m1.group(1).trim(), StandardCharsets.UTF_8);
|
||||
} catch (Exception ignored) {
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ public class FsTool extends PanBase {
|
||||
if (m2.find()) {
|
||||
try {
|
||||
return URLDecoder.decode(m2.group(1).trim(), StandardCharsets.UTF_8);
|
||||
} catch (Exception ignored) {
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user