moloch-- / RootTheBox

A Game of Hackers (CTF Scoreboard & Game Manager)
http://root-the-box.com/
Apache License 2.0
908 stars 292 forks source link

585 flagdepends #611

Closed bmartin5692 closed 1 month ago

bmartin5692 commented 1 month ago

Closes #585

The cause of this bug was a race condition as both getBoxFlags and getDetails were executed at once. In some cases the flag details would return before the boxflags returned and updated the flaglist, resulting in it selecting the empty option.

This fix makes getBoxFlags return a promise which we now await before moving to getDetails.