Skip to content

Frontend fails to render when invalid date in CTF #297

@daanbreur

Description

@daanbreur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions