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

Wolfbot accepts game starter commands from private message by non players #1

Open
GoogleCodeExporter opened this issue Apr 5, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. start game using !start
2. add minimum 4 players using !join
3. !start game
4. Use a 5th person to !del players, and !end game

Non players should not be able to do anything to the game.

This is the bot running on #leifswolfbot

Going through the code, it appears that there is absolutely no validation on 
the !end command 
whatsoever.
http://code.google.com/p/ircbot-collection/source/browse/trunk/wolfbot.py#809

I think it would be prudent to set it up so that only living players can send 
messages to the bot 
in a game in progress, instead of putting validation into each command.

Original issue reported on code.google.com by vert...@gmail.com on 25 May 2008 at 6:08

@GoogleCodeExporter
Copy link
Author

http://code.google.com/p/ircbot-collection/source/browse/trunk/wolfbot.py#927

I think the correct fix would be to change the check to not accept commands 
from people NOT in the group of 
living players. (instead of checking the group of dead players) This fix most 
of the issues.

Attached find an untested patch that fixes the problem.

Original comment by vert...@gmail.com on 26 May 2008 at 7:57

Attachments:

@GoogleCodeExporter
Copy link
Author

thinking about it again, here's an updated patch which leaves the dead player 
check only for when the game is 
actually running (otherwise nobody could join)

Original comment by vert...@gmail.com on 26 May 2008 at 8:11

Attachments:

@GoogleCodeExporter
Copy link
Author

and this version clarifies who ended the game, so that it can be known if 
someone did it in spite in pvt.

Original comment by vert...@gmail.com on 26 May 2008 at 8:25

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant