Repository navigation
fix(collab): sanitize Redis configuration errors - #333
Conversation
runbear-bot
left a comment
There was a problem hiding this comment.
Bobb's bot(Totoro) Review
Conclusion: ready-with-notes
파싱 실패 시 ParseURL의 원문 오류를 버리고 고정된 오류를 반환하므로 Redis 사용자명·비밀번호·쿼리값 등 설정값이 진단에 포함되지 않습니다. 호출 경로(cmd/bdrive/web.go)도 이 오류를 그대로 startup refusal로 전달합니다.
Notes
internal/webapp/collab_relay.go:50-52: 잘못된 scheme/database/timeout이 모두 같은 메시지로 합쳐져 안전한 진단 정보도 사라집니다. 설정값을 포함하지 않는 고정된 오류 분류나 안내 문구를 고려해 주세요.internal/webapp/ycollab_cluster_test.go:352-365: 테스트가 “어떤 오류든 발생”만 확인하므로 의도한 parse-error 경로와 고정 메시지를 직접 고정하지는 않습니다. 현재 변경의 merge blocker는 아닙니다.
Verification
git diff --check: passed.- Focused Go test,
go vet ./...,go build ./...: not run (reason: Go toolchain is not installed;go: command not found), each0 / 0 / 0. - Independent OMX draft: completed; no blocker found. Live Redis/GitHub CI were not exercised.
|
Keeping the fixed diagnostic is intentional. URL and query parsers can echo configuration values, and no caller branches on the error text. Additional diagnostic categories would add branches without strengthening the confidentiality guarantee. The tests assert both rejection and omission of configuration values. With the same final tests, four confidentiality cases fail on |
runbear-bot
left a comment
There was a problem hiding this comment.
Bobb's bot(Totoro) Review
Conclusion: ready-with-notes
파싱 오류에서 원본 진단을 전달하지 않아 설정값 노출 경로를 차단하며, 기존 호출자는 오류를 반환해 서버 시작을 중단합니다. 머지 차단 사항은 발견하지 못했습니다.
Verification
git diff --check 844e708...2d797f0: 통과.- 집중 Go 테스트
go test ./internal/webapp -run 'TestConnectCollabRedisParseErrorOmitsSecrets|TestCollabProcessesConvergeOverRedis': 미실행,0 / 0 / 0(Go 도구 없음). 실제 Redis 및 CLI 실행은 검증하지 못했습니다. - 작성자는 base 대비 기밀값 노출 회귀 테스트와 설치 바이너리 검증을 보고했습니다. 이는 작성자 보고이며 독립 실행 결과는 아닙니다.
TL;DR
Root cause
The Redis URL parser can include input values in its error. Returning that error from
ConnectCollabpassed those values to the CLI diagnostic. This was found during pre-release validation and is a user-requested fix; there is no separate linked issue.Changes
QA
TestConnectCollabRedisParseErrorOmitsSecretsTestCollabProcessesConvergeOverRedisVerification
Head:
2d797f0f4a62ba6ab09525bfcffe1bd5a8728bbc.go test ./... -count=1 -timeout=45m: passed.go vet ./...andgo build ./...: passed.Same final regression tests, with the pre-fix runtime overlaid:
844e708The installed pre-fix and fixed binaries both reject the two malformed configurations. Only the pre-fix binary includes the synthetic confidential values in its output.
Upgrade impact and limits
Invalid Redis settings now produce a generic diagnostic instead of parser details. Empty settings, address prefixing, connection failures, and successful relay setup keep their existing behavior.
No frontend, dependency, protocol, or architecture changes. Live Redis, GCS, and S3 services were not exercised; the Redis integration control uses miniredis. Existing frontend test failures were not changed or counted as passing.