Skip to content

[Backend] — Prediction Note Length and Sanitization #1624

Description

@Olowodarey

Problem
predictions accepts a free-text note without length limits or sanitization, risking storage bloat and stored-XSS via API consumers.

Requirements

  • Enforce a max length and strip/escape unsafe content on write.
  • Return a clear validation error on violation.
  • Tests: over-length rejected; unsafe content sanitized.

Acceptance Criteria

  • Prediction notes are bounded and safe. Covered by tests.

Files

  • backend/src/predictions/predictions.service.ts
  • backend/src/predictions/dto
  • backend/src/migrations/1775000000000-AddPredictionNoteColumn.ts

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions