yukaidi
2a9fa81e56
fix: CacheManager registerPeriodicCleanup 添加防重入和 Vertx 就绪检查
...
审查发现 static 块中注册定时任务存在时序风险:如果 CacheServiceImpl 在 Vertx
初始化前被加载,定时任务将注册失败且无法恢复。添加 cleanupRegistered 标志防止
重复注册,Vertx 未就绪时跳过并等待下次调用。
2026-05-29 07:02:23 +08:00
yukaidi
5eed1fdfa0
revert: 回退 MyData.java 的构造函数修改,恢复为空 TODO
...
用户明确表示不需要改动 MyData 的 TODO,回退 741d7aa 对该文件的修改。
2026-05-29 06:58:41 +08:00
yukaidi
cf7fc4f502
fix: FjTool login() 中 token.substring 添加 null 保护
...
token 脱敏日志在 token 可能为 null 时会抛 NPE,添加 null 检查。
2026-05-29 06:58:09 +08:00
yukaidi
0ea31d631a
fix: 移除 IzTool/IzToolWithAuth login() 中未使用的 h 变量(死代码)
...
并发安全修复引入的 h 变量创建后从未使用,后续请求仍通过
setTemplateParam("appToken", token) 传递 token。删除死代码并为
同一行的 token.substring 添加 null 保护。
2026-05-29 06:57:44 +08:00
yukaidi
74840ab63f
fix(FsTool): 收窄 parseFileNameFromContentDisposition 中的 catch 异常类型
...
将 catch(Exception) 改为 catch(IllegalArgumentException),
只捕获 URLDecoder.decode 在遇到非法百分比编码时抛出的具体异常。
2026-05-29 06:38:35 +08:00
yukaidi
31f33339f1
fix(FsTool): 修复 parseById 中 get("paramJson") 可能导致的 NPE
...
当 otherParam 中缺少 "paramJson" 键时,后续 getString 调用会抛出 NPE。
添加 null 检查并提前返回失败。
2026-05-29 06:37:53 +08:00
yukaidi
c0a0d0dc47
fix(FjTool): 修复 parseById 中 get("paramJson") 可能导致的 NPE
...
当 otherParam 中缺少 "paramJson" 键时,后续 getString 调用会抛出 NPE。
添加 null 检查并提前返回失败。
2026-05-29 06:37:12 +08:00
yukaidi
0cd77ee9b9
fix(IzTool): 修复 parseFileList 中 get("uuid") 可能导致的 NPE
...
当 otherParam 中缺少 "uuid" 键时,原代码直接调用 .toString() 会抛出
NullPointerException。改为先取出 Object 再做 null 检查。
2026-05-29 06:36:43 +08:00
yukaidi
741d7aa8ca
fix: implement MyData @DataObject constructor deserialization
...
Implement the MyData(JsonObject) constructor to deserialize `id` and
`maxSize` fields from the provided JsonObject, replacing the empty TODO.
2026-05-29 06:28:39 +08:00
yukaidi
d06a80dc73
fix: narrow catch exception type in LzTool.java
...
Replace 2 instances of `catch (Exception ignored)` with
`catch (MalformedURLException ignored)` around `new java.net.URL(url)`
calls, since that constructor only throws MalformedURLException.
2026-05-29 06:28:20 +08:00
yukaidi
86b9c43b8b
fix: narrow catch exception type in ParserCreate.java
...
Replace 5 instances of `catch (Exception ignored)` with
`catch (IllegalStateException ignored)` around matcher.group() calls,
since that method only throws IllegalStateException when a named group
does not exist.
2026-05-29 06:27:51 +08:00
yukaidi
206981d4b4
revert: RouterHandlerFactory failureHandler 恢复返回 failure message
...
原 ctx.failure().getMessage() 是故意设计——RateLimiter 等组件通过 promise.fail()
传递用户友好的错误消息(如"请求次数太多了"),这些消息需要通过 failureHandler
返回给客户端。改为固定"服务器内部错误"会导致这些消息丢失。
仅添加 null 检查防止 NPE。
2026-05-29 06:15:56 +08:00
yukaidi
7d5831b5f4
fix: 彻底消除用户枚举和异常信息泄露的遗留问题
...
- UserServiceImpl: 3处"用户不存在"统一改为"用户名或密码错误"/"认证失败"
- RouterHandlerFactory: failureHandler 中 ctx.failure().getMessage() 改为"服务器内部错误"
2026-05-29 05:53:40 +08:00
yukaidi
7ca63985bd
fix(test): 删除空的 ParserApiClientLinkTest 文件
...
该文件仅包含空行,无实际测试代码,直接删除。
2026-05-29 04:06:21 +08:00
yukaidi
06416a4e5f
fix(test): JsFetchBridgeTest Vertx 资源泄漏修复
...
将各 @Test 方法中局部创建的 Vertx.vertx() 统一为成员变量,
通过 @Before 创建并初始化,@After 关闭,避免资源泄漏。
2026-05-29 04:06:13 +08:00
yukaidi
88739e8d1a
fix(test): JsParserTest Vertx 资源泄漏修复
...
将各 @Test 方法中局部创建的 Vertx.vertx() 统一为成员变量,
通过 @Before 创建并初始化,@After 关闭,避免资源泄漏。
2026-05-29 04:04:52 +08:00
yukaidi
ffaba4f496
fix(test): BaiduPhotoParserTest Vertx 资源泄漏修复
...
将各 @Test 方法中局部创建的 Vertx.vertx() 统一为成员变量,
通过 @Before 创建并初始化,@After 关闭,避免资源泄漏。
2026-05-29 04:03:37 +08:00
yukaidi
c4f94a2bc7
fix: replace printStackTrace/System.out.println with logger in JsHttpClient, PlaygroundApi, LogStatistics, CacheServiceImpl, JsPlaygroundExecutor, JsPlaygroundLogger
2026-05-29 03:48:11 +08:00
yukaidi
49a3918244
fix: replace double-brace init with static block + Collections.unmodifiableMap; add final to UNIQUE_PREFIX
2026-05-29 03:40:06 +08:00
yukaidi
caddff567f
fix: replace System.out.println with logger in IpExtractor
2026-05-29 03:39:36 +08:00
yukaidi
aed9e9f10d
fix: replace System.out.println/printStackTrace with logger in ReqIpUtil; add final to static fields
2026-05-29 03:39:11 +08:00
yukaidi
6557b49383
fix: replace System.out.println with log.debug in MkgsTool
2026-05-29 03:38:36 +08:00
yukaidi
082cc4c743
fix: replace System.out.println with log in PodTool; mask token in log output
2026-05-29 03:38:07 +08:00
yukaidi
e261ebe698
fix: replace System.out.println with log.debug in WsTool
2026-05-29 03:37:32 +08:00
yukaidi
5a0dc69186
chore: remove debug console.log statements
...
Remove debug logging from production code while preserving
console.error and console.warn for actual error/warning cases.
2026-05-29 03:28:22 +08:00
yukaidi
29d8bf3ea4
fix(security): add noopener,noreferrer to all window.open calls
...
Prevent reverse tabnapping by adding security attributes to all
window.open calls that open links in new tabs.
2026-05-29 03:24:53 +08:00
yukaidi
07a330cfd4
fix: LocalConstant 改用 ConcurrentHashMap 保证线程安全,LzTool 方法名拼写修正
...
- LocalConstant: HashMap → ConcurrentHashMap,put() 改用 putIfAbsent 消除 check-then-act 竞态
- LzTool: 私有方法 setDateAndComplate → setDateAndComplete(拼写修正,仅内部调用)
2026-05-29 03:14:10 +08:00
yukaidi
aa30571709
fix(security): 升级 axios 版本 1.13.5 -> 1.16.1
...
修复 14 个安全漏洞
2026-05-29 03:08:59 +08:00
yukaidi
2bb9912cf5
fix(security): 升级 Vert.x 版本 4.5.24 -> 4.5.27 (parser 模块)
...
修复 SslContext 缓存 DoS 漏洞
2026-05-29 03:08:43 +08:00
yukaidi
8f77d9fe98
fix(security): 升级 Vert.x 版本 4.5.24 -> 4.5.27 (根 pom.xml)
...
修复 SslContext 缓存 DoS 漏洞
2026-05-29 03:08:27 +08:00
yukaidi
9cb32b3e8f
fix(security): 升级 postgresql 驱动版本 42.7.3 -> 42.7.11
...
修复 SCRAM 认证 DoS 漏洞
2026-05-29 03:08:00 +08:00
yukaidi
080206925f
fix(security): 升级 logback 版本 1.5.19 -> 1.5.32 (parser 模块)
...
修复 CVE-2024-12798 等 3 个安全漏洞
2026-05-29 03:07:39 +08:00
yukaidi
54d2a8189c
fix(security): 升级 logback 版本 1.5.18 -> 1.5.32 (根 pom.xml)
...
修复 CVE-2024-12798 等 3 个安全漏洞
2026-05-29 03:07:22 +08:00
yukaidi
377bc12cf9
fix: Dockerfile 添加非 root 用户运行应用,提升容器安全性
2026-05-29 02:55:57 +08:00
yukaidi
da715c8a8f
fix: CacheManager 消除双括号初始化,改用标准 HashMap 写法
2026-05-29 02:55:32 +08:00
yukaidi
fa4028296f
fix: FjTool parseFileList 中 uuid 参数为 null 时的 NPE
2026-05-29 02:54:00 +08:00
yukaidi
dc629a3126
fix: P115Tool 中 UA 参数为 null 时的 NPE,添加默认 User-Agent
2026-05-29 02:53:32 +08:00
yukaidi
746c7ad5b3
fix: 替换 e.printStackTrace() 和 System.out.println 为 logger 调用
...
- HttpProxyVerticle: err.printStackTrace() / e.printStackTrace() -> LOGGER.error()
- RouterHandlerFactory: 5处 printStackTrace() -> LOGGER.error()
- CommonUtil: e.printStackTrace() -> LOGGER.error()
- ReflectionUtil: 新增 LOGGER,3处 printStackTrace() -> LOGGER.error()
- CreateDatabase: e.printStackTrace() -> LOGGER.error()
- URLUtil: 新增 LOGGER,e.printStackTrace() -> LOGGER.error()
- LzTool: e.printStackTrace() -> log.error()
- MkwTool: 3处 System.out.println + 1处 printStackTrace -> log.debug()/log.error()
- PdbTool: e.printStackTrace() -> log.error()
- ParserApi: t.printStackTrace() -> log.error()
- CacheManager: 2处 Throwable::printStackTrace -> LOGGER.error()
- QQTool: 3处 System.out.println -> log.debug()
- FjTool: System.out.println -> log.debug()
2026-05-29 02:50:06 +08:00
yukaidi
aef1b9ab11
fix: IzToolWithAuth 并发安全 - token/authFlag 改为 volatile,header 副本替代共享修改
2026-05-29 02:49:01 +08:00
yukaidi
79c9eb3dda
fix: FjTool 并发安全 - token/userId/authFlag 改为 volatile,header0 副本替代共享修改
2026-05-29 02:48:13 +08:00
yukaidi
5a08ed68c2
fix: IzTool 并发安全 - token/authFlag 改为 volatile,header 副本替代共享修改
2026-05-29 02:47:27 +08:00
yukaidi
e5a623c5a8
fix: 将 secret.yml 加入 .gitignore 防止敏感配置泄露
2026-05-29 02:41:00 +08:00
yukaidi
4586138bf1
fix: 修复 AESUtils.getRandomString 使用不安全的 Random,改为 SecureRandom
2026-05-29 02:40:32 +08:00
yukaidi
1dddec110e
fix: 修复 PasswordUtil.checkPassword 中的时序攻击漏洞,使用 MessageDigest.isEqual()
2026-05-29 02:39:31 +08:00
yukaidi
46e9999e4c
fix: 修复 CacheManager.updateTotalByField 中 getShareKeyTotal 缺少 onFailure 导致 Promise 永不完成
2026-05-29 02:39:05 +08:00
yukaidi
a664ae3a56
fix: 修复 ParserApi 中 redirectUrl() 和 viewUrl() 的 Promise 未 complete 问题
2026-05-29 02:38:27 +08:00
yukaidi
9bcdcb2cb7
fix: 修复 MkwTool 中 set-cookie 为 null 时的 NPE
2026-05-29 02:37:22 +08:00
yukaidi
0b8592559a
fix: 修复 CommonUtils.getURLParams() 中 fullUrl.getQuery() 返回 null 时的 NPE
2026-05-29 02:36:47 +08:00
yukaidi
c0b18be5ab
fix: 修复 ShareLinkInfo.getCacheKey() 中 otherParam.get("UA") 可能导致的 NPE
2026-05-29 02:36:20 +08:00
yukaidi
46b2eb1ccd
修复RouterHandlerFactory异常信息泄露:Future失败和异常捕获时返回通用错误消息,详细异常仅记日志
2026-05-29 02:26:12 +08:00