Skip to content

Commit ddb7a8d

Browse files
authored
Feat/fix qq ssrf url list (openclaw#65788)
* fix: update qqbot media host allowlist * fix: update qqbot media host allowlist * fix: update qqbot media host allowlist * fix: update qqbot media host allowlist
1 parent 0cfb83e commit ddb7a8d

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

extensions/qqbot/src/utils/file-utils.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,16 @@ describe("qqbot file-utils downloadFile", () => {
4747
ssrfPolicy: QQBOT_MEDIA_SSRF_POLICY,
4848
});
4949
expect(QQBOT_MEDIA_SSRF_POLICY).toEqual({
50-
hostnameAllowlist: ["*.myqcloud.com", "*.qpic.cn", "*.qq.com", "*.tencentcos.com"],
50+
hostnameAllowlist: [
51+
"*.qpic.cn",
52+
"*.qq.com",
53+
"*.weiyun.com",
54+
"*.qq.com.cn",
55+
"*.ugcimg.cn",
56+
"*.myqcloud.com",
57+
"*.tencentcos.cn",
58+
"*.tencentcos.com",
59+
],
5160
allowRfc2544BenchmarkRange: true,
5261
});
5362
});

extensions/qqbot/src/utils/file-utils.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,18 @@ export const MAX_UPLOAD_SIZE = 20 * 1024 * 1024;
1616
export const LARGE_FILE_THRESHOLD = 5 * 1024 * 1024;
1717

1818
const QQBOT_MEDIA_HOSTNAME_ALLOWLIST = [
19-
"*.myqcloud.com",
19+
// QQ富媒体
2020
"*.qpic.cn",
2121
"*.qq.com",
22+
"*.weiyun.com",
23+
"*.qq.com.cn",
24+
25+
// QQ机器人
26+
"*.ugcimg.cn",
27+
28+
// 腾讯云COS
29+
"*.myqcloud.com",
30+
"*.tencentcos.cn",
2231
"*.tencentcos.com",
2332
];
2433

0 commit comments

Comments
 (0)