fix(im): harden Yunzhijia image download and prune dead validation
- Follow a single download redirect while re-validating the target stays within the allowed host suffix; never forward the bearer token across it. The shared http client disables auto-redirects for SSRF safety, so a 302 from downloadfileOpen previously failed the download outright. - Cap in-memory download size at 32 MiB via a limited read-closer that errors instead of silently truncating, avoiding OOM on large responses. - Remove dead frontend host-suffix validation branch (normalize always fills the default) and drop the now-unused i18n keys yunzhijiaAllowedHostSuffixRequired / yunzhijiaRequiredCredentials. - Add tests for redirect follow/reject and the size limit.
This commit is contained in:
@@ -5916,9 +5916,7 @@ export default {
|
||||
yunzhijiaTimeoutHint: "메시지 전송 URL을 통한 응답 전송 타임아웃, 기본 10초",
|
||||
yunzhijiaAllowedHostSuffix: "허용 호스트 접미사",
|
||||
yunzhijiaAllowedHostSuffixHint: "보안을 위해 메시지 전송 URL 호스트를 이 접미사로 제한 (예: yunzhijia.com)",
|
||||
yunzhijiaRequiredCredentials: "메시지 전송 URL과 허용 호스트 접미사를 입력하세요",
|
||||
yunzhijiaSendMsgUrlRequired: "Yunzhijia 로봇 설정의 메시지 전송 URL을 입력하세요",
|
||||
yunzhijiaAllowedHostSuffixRequired: "허용 호스트 접미사를 입력하세요",
|
||||
mattermostModeHint: "Mattermost는 Webhook(아웃고잉 웹훅 + 봇 토큰)만 지원합니다.",
|
||||
mattermostPostToMain: "답변을 채널 메인 타임라인에 표시",
|
||||
mattermostPostToMainHint:
|
||||
|
||||
Reference in New Issue
Block a user