Skip to content

[Frontend][Bug] Test-enrollment harness shipped as a production route; can post fake payment data #465

Description

@Penielka

Overview

frontend/src/app/test-enrollment/page.tsx is a full test harness mounted as a real route (/test-enrollment) in the Next.js app router — it ships to production. The page posts mock payment payloads to /api/enroll with recipientAddress: 'TEST_RECIPIENT_ADDRESS', transactionHash: 'TEST_TX_HASH_12345' and status: 'completed'. Anyone who visits the route can insert fake enrollments/payments into the backend database.

Evidence

  • frontend/src/app/test-enrollment/page.tsx — POST body with fake payment details

Acceptance Criteria

  • Remove the route from the production build (or gate it behind an env flag)
  • Add a backend-side validation that rejects obviously fake transaction hashes
  • Verify no production enrollments were created by this page

Files to Modify

  • frontend/src/app/test-enrollment/page.tsx

Priority: High

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

    bugSomething isn't workingfrontendFrontend UI/UX issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions