Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The player continues to participate in the event from the team after the kick #307

Open
1 task done
CyberFazaN opened this issue Jun 22, 2024 · 2 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@CyberFazaN
Copy link

CyberFazaN commented Jun 22, 2024

Before submitting / 提交之前

  • I have verified that I use latest version and no similar issues were found. / 我已验证我使用的是最新版本,并且没有找到类似的问题。

What version of GZCTF are you using? / 您使用的 GZCTF 版本是什么?

v0.20.3#c7973d

What is the commit hash for your build? (in About page and backend logs) / 您所使用的构建的提交哈希是什么?(在关于页面和后端日志中)

#c7973d

In which browsers you can reproduce the issue? / 您在哪些浏览器中可以重现此问题?

All

Describe the bug / 描述 bug

The player continues to participate in the event from the team after the kick. A record of the player's participation remains in the database and new players in the team cannot participate because of this. Perhaps this bug may still be present when exiting the team (I did not check, but there is definitely such a thing when kicking).

Expected behavior / 期望行为

All applications for participation are deleted from the player upon exit/kick.

Possible fix / 可能的修复

gzctf=# DELETE FROM public."UserParticipations"
gzctf-# WHERE "UserId" = '00000000-0000-0000-0000-000000000000';

This helps me to cancel player's participation (where '00000000-0000...' is UserID).

@GZTimeWalker
Copy link
Owner

GZTimeWalker commented Jun 22, 2024

First, according to the design, the team should be correctly locked at this time and the members cannot be changed. Why is there a player who was kicked out during the competition?

After that, well, I'm not absolutely sure whether the UserParticipations for this kick-out behavior should be delete. I mean, is there a risk of cheating?

And, how should we distinguish between being kicked out after the game and being kicked out during the game? For the former, this may be just a normal member adjustment, and the game records as historical data should not be deleted.

@CyberFazaN
Copy link
Author

CyberFazaN commented Jun 22, 2024

Why is there a player who was kicked out during the competition?

The player was idle, the team decided to replace this player. (1st case) Not all teams are historical, someone gathers with random people in a chat and then it turns out that they only get in the way.
This bug was also out of game time. The team was unlocked and the team kicked one player, but he continued to participate and the team could not take another player in his place.

After that, well, I'm not absolutely sure whether the UserParticipations for this kick-out behavior should be delete. I mean, is there a risk of cheating?

Sure, It was a hot-fix. I think it might be worth adding an additional field that will indicate whether this record is active or not.

I would also like to suggest ideas for improving the platform:

  1. The ability to see the player's team in his card and go to it from the card (for admins)
  2. On the contrary, the ability to go to the player from the team card (for admins)
  3. The ability to switch to the player/team from the scoreboard (for admins)
  4. Search in logs
  5. The ability to give the flag the case insensitivity attribute
  6. The ability to see all the players who had the same IP addresses in the logs (we found two players with the same IP in different teams, teams handed over the same flags at about the same time)
  7. logging user-agents and other parameters (fingerprint) that can be used to detect cheaters (I have a simple js code that gets a list of such values, I will be happy to share).

Now we are holding competitions on your platform - it is really cool. Thank you for your work.
P.S. I forgot to do a docker pull, sorry. Now I have the latest version of the platform installed.

@hez2010 hez2010 added the enhancement New feature or request label Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants