From: Ant Zucaro Date: Tue, 1 Nov 2011 17:09:50 +0000 (-0400) Subject: Prevent people from viewing the bot and untracked player records. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6be274180646d6cc91cbfc94186b79061c65d526;p=xonotic%2Fxonstat.git Prevent people from viewing the bot and untracked player records. --- diff --git a/xonstat/views/player.py b/xonstat/views/player.py index c9e5290..22febaa 100755 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -38,7 +38,10 @@ def player_info(request): """ Provides detailed information on a specific player """ - player_id = request.matchdict['id'] + player_id = int(request.matchdict['id']) + if player_id <= 2: + player_id = -1; + try: player = DBSession.query(Player).filter_by(player_id=player_id).one()