
This application is named Man-in-the middle because it contains a vulnerability in Next.JS middleware and the flag is in the API call.
.env.productionDATABASE_URL=postgresql://postgres:password@db:5432/nextauth
JWT_SECRET=your-production-secret
docker compose up --build -d
git clone <your-repo-url>
cd <your-project-folder>
npm install
Create a separate docker-compose.dev.yml for dev:
version: "3.8"
services:
db:
image: postgres:16
restart: always
environment:
POSTGRES_USER: devuser
POSTGRES_PASSWORD: devpass
POSTGRES_DB: devdb
volumes:
- devdata:/var/lib/postgresql/data
ports:
- "5433:5432"
volumes:
devdata:
Then run it:
docker compose -f docker-compose.dev.yml up -d
.envDATABASE_URL=postgresql://devuser:devpass@localhost:5433/devdb
JWT_SECRET=dev-secret
npx prisma generate
npx prisma migrate dev --name init
npx tsx prisma/seed.ts
npm run dev
You can test login with the seeded admin user:
email: [email protected]
password: adminSup3rS3cur3P@ssw0rd