Description
PinContentDto.content (src/ipfs-pinning/ipfs-pinning.dto.ts) is validated with @IsBase64() and @IsNotEmpty() but has no @MaxLength() or any other size cap, and IpfsPinningService.pinContent() (src/ipfs-pinning/ipfs-pinning.service.ts) does Buffer.from(dto.content, 'base64') on whatever is supplied with no explicit size check before attempting to hash and pin it. main.ts (src/main.ts) never configures an explicit body-size limit either, so the effective cap today is whatever Express's/body-parser's implicit default happens to be — undocumented and easy to hit unexpectedly for legitimate larger deliverables, while also not being a deliberate, reviewed DoS control.
Component
Backend
Difficulty
🟢 Easy
Tasks
Acceptance Criteria
Estimated Time
3-5 hours
Description
PinContentDto.content(src/ipfs-pinning/ipfs-pinning.dto.ts) is validated with@IsBase64()and@IsNotEmpty()but has no@MaxLength()or any other size cap, andIpfsPinningService.pinContent()(src/ipfs-pinning/ipfs-pinning.service.ts) doesBuffer.from(dto.content, 'base64')on whatever is supplied with no explicit size check before attempting to hash and pin it.main.ts(src/main.ts) never configures an explicit body-size limit either, so the effective cap today is whatever Express's/body-parser's implicit default happens to be — undocumented and easy to hit unexpectedly for legitimate larger deliverables, while also not being a deliberate, reviewed DoS control.Component
Backend
Difficulty
🟢 Easy
Tasks
main.ts(e.g. viaapp.use(json({ limit: '...' }))) appropriate for expected deliverable sizesPinContentDto/IpfsPinningService.pinContent()with a clear 400 error rather than relying solely on the framework-level body limitPOST /ipfs/pinsAcceptance Criteria
Estimated Time
3-5 hours