StudSec / pwncrates

A CTF framework with a focus on educational benefit.
https://ctf.studsec.nl
GNU General Public License v3.0
4 stars 8 forks source link

Scoreboard sorting #35

Closed delta6862 closed 8 months ago

delta6862 commented 9 months ago

Currently, the scoreboard does not take first solve into account. This is an issue in the following situation (which is currently the case for ctf.studsec.nl):

1 Yannik                             3975
2 M4rk                               3975

Two users have solved all challenges, granting them the maximum amount of points. The standard for this situation is to award positions on a "first come first server" basis, meaning the first to achieve a certain point count gets the highest rank (in this case, M4rk).

The solution

First, we order by score, within this we rank by time solved. SQL supports this (https://stackoverflow.com/questions/2051162/sql-multiple-column-ordering), however implementing it will be slightly convoluted, likely requiring a union to add the latest solve time as a column.

Aidan-Stephenson commented 8 months ago

Resolved in 9dfb11ae43f8c4b8bc5b46ed0e44921ec086a271