nemanjam / nextjs-prisma-boilerplate

Full stack boilerplate with Next.js, Prisma, Tailwind, TypeScript, Docker, Postgres, documentation, frontend and backend unit and integration tests with Jest, Cypress end-to-end tests, Github Actions CI/CD workflows, and production deployment with Traefik and Docker.
https://nextjs-prisma-boilerplate.arm1.nemanjamitic.com
MIT License
640 stars 85 forks source link

Creating user with certain usernames breaks the application #3

Open govindpuff opened 1 year ago

govindpuff commented 1 year ago

Describe the bug If I create a user with username = users, the /users page breaks.

To Reproduce

  1. Create a new account with username = users
  2. Log in with that account
  3. Navigate to the /users page
  4. You will encounter an error page.

Expected behavior The user should not be allowed to create a user with username = user, or the page routing should be nested one layer further, like /users/[username]. Using the same level for both dynamic and static routes is risky as shown above.

Screenshots image image

Environment (please complete the following information):

Additional context Add any other context about the problem here.

nemanjam commented 1 year ago

Thank you for this, I will have a look.