SaintNong / SaintCTF

A custom platform for hosting capture the flag tournaments.
GNU Affero General Public License v3.0
3 stars 0 forks source link

When adding challenges and restarting, challenge IDs will sometimes be incorrect. #10

Closed SaintNong closed 6 months ago

SaintNong commented 6 months ago

When adding a new challenge, if it is easier than any of the old challenges, it will be sorted to the middle of ChallengeManager.challenges, and the IDs of any preceding challenges will be incorrect by one.

If solve data is persisted after restart, then the solved challenge of some solves will be incorrect, making the leaderboard and the profile graphs incorrectly displayed.

TheComputerNerd88 commented 6 months ago

I had a look at the database schema whilst developing commit a1be320 - could we just switch challenge_id in the solve table to be a string/varchar?

TheComputerNerd88 commented 6 months ago

This will be integrated into PR #11.

TheComputerNerd88 commented 6 months ago

@SaintNong: please test that this issue is resolved with commit 40eaae5.

SaintNong commented 6 months ago

Solved