Skip to content

feat: add isHash validator decorator#212

Merged
yuchem2 merged 2 commits intodevelopfrom
CARGO-394
Apr 11, 2026
Merged

feat: add isHash validator decorator#212
yuchem2 merged 2 commits intodevelopfrom
CARGO-394

Conversation

@yuchem2
Copy link
Copy Markdown
Member

@yuchem2 yuchem2 commented Apr 8, 2026

웹 서버 요청 검증에서 자주 사용되는 해시 알고리즘(MD5, SHA-1, SHA-2 계열, CRC32)만 지원하도록 작성하였습니다. SHA-3, Blake 등은 HTTP 요청 파라미터 검증에서 사용 빈도가 극히 낮아 현재 스코프에서 제외했으며, 필요시 추후 hashPatterns에 추가하는 것만으로 쉽게 확장할 수 있습니다.

@auto-assign auto-assign Bot requested review from dami0806, laggu and sezeme April 8, 2026 12:39
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the @IsHash validation decorator, supporting various algorithms including MD5, SHA, and CRC32, along with corresponding documentation and tests. Review feedback recommends renaming properties in the example router for better clarity and adding explicit test cases for the crc32b algorithm to ensure full coverage.

Comment thread apps/example/src/routers/validator.ts
Comment thread packages/express-cargo/tests/validator/isHash.test.ts
@yuchem2 yuchem2 merged commit 6fba5b1 into develop Apr 11, 2026
3 checks passed
@yuchem2 yuchem2 deleted the CARGO-394 branch April 11, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants