From: Jan Behrens Date: Wed, 8 Jan 2014 18:08:05 +0000 (+0100) Subject: Merge branch 'master' into zykure/wip X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5f80cb7090f4221ba5213f301bf1be9b1fbaa040;p=xonotic%2Fxonstat.git Merge branch 'master' into zykure/wip Conflicts: xonstat/__init__.py xonstat/views/player.py --- 5f80cb7090f4221ba5213f301bf1be9b1fbaa040 diff --cc xonstat/views/player.py index 38fced4,19ec081..75e9ff8 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@@ -788,11 -789,13 +789,17 @@@ def player_damage_json(request) def player_hashkey_info_data(request): + # hashkey = request.matchdict['hashkey'] + + # the incoming hashkey is double quoted, and WSGI unquotes once... + # hashkey = unquote(hashkey) + + # if using request verification to obtain the hashkey - (hashkey, status) = verify_request(request) + (idfp, status) = verify_request(request) + log.debug("d0_blind_id verification: idfp={0} status={1}\n".format(idfp, status)) + + log.debug("\n----- BEGIN REQUEST BODY -----\n" + request.body + + "----- END REQUEST BODY -----\n\n") # if config is to *not* verify requests and we get nothing back, this # query will return nothing and we'll 404. @@@ -800,13 -803,14 +807,14 @@@ player = DBSession.query(Player).\ filter(Player.player_id == Hashkey.player_id).\ filter(Player.active_ind == True).\ - filter(Hashkey.hashkey == hashkey).one() + filter(Hashkey.hashkey == idfp).one() - games_played = get_games_played(player.player_id) - overall_stats = get_overall_stats(player.player_id) - fav_maps = get_fav_maps(player.player_id) - elos = get_elos(player.player_id) - ranks = get_ranks(player.player_id) + games_played = get_games_played(player.player_id) + overall_stats = get_overall_stats(player.player_id) + fav_maps = get_fav_maps(player.player_id) + elos = get_elos(player.player_id) + ranks = get_ranks(player.player_id) + most_recent_game = get_recent_games(player.player_id, 1)[0] except Exception as e: raise pyramid.httpexceptions.HTTPNotFound @@@ -909,12 -919,10 +923,18 @@@ def player_elo_info_data(request) """ Provides elo information on a specific player. Raw data is returned. """ + (idfp, status) = verify_request(request) + log.debug("d0_blind_id verification: idfp={0} status={1}\n".format(idfp, status)) + hashkey = request.matchdict['hashkey'] ++<<<<<<< HEAD + log.debug("\n----- BEGIN REQUEST BODY -----\n" + request.body + + "----- END REQUEST BODY -----\n\n") ++======= + + # the incoming hashkey is double quoted, and WSGI unquotes once... + hashkey = unquote(hashkey) ++>>>>>>> master try: player = DBSession.query(Player).\