CTFNote icon indicating copy to clipboard operation
CTFNote copied to clipboard

Frontend fails to render when invalid date in CTF

Open daanbreur opened this issue 7 months ago • 1 comments

Bug

If there is a CTF entry with a invalid date in the database the frontend bug out. You can keep using CTFNote by directly opening the ctf pages if you know their ID and name. The page for the bugged entry will not open using this trick however

image image

In the pictures above you see what normally happens when using the website.

image image image

However if you "invalid date" you see that the graphql does send the data over but the site does not render properly. In the last image you see what happens when you directly go to the http://localhost:8088/#/ctf/2-ads/info page.

Proposal

This bug can be quite harmful because you will have to manually edit the database (or craft a GraphQL query) to get your instance working again. To fix this issue I have 2 proposed fixes.

  1. Make sure server side that invalid dates can never occur.
  2. Capture invalid dates client side and show an error.
  3. Make sure you cannot set these dates in the create CTF menu.

daanbreur avatar Jul 17 '24 12:07 daanbreur