From ba87db30b0e10d25c50ec13aeb14b62c7693dec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nut=CC=A6iu?= Date: Thu, 24 Aug 2017 19:00:30 +0300 Subject: [PATCH] IP is kinda tricky and a wrong implementation is a huge security risk --- src/views/scoreboard.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/views/scoreboard.py b/src/views/scoreboard.py index d9609b9..3f59d1b 100644 --- a/src/views/scoreboard.py +++ b/src/views/scoreboard.py @@ -52,10 +52,7 @@ def result_post(): cpu = content['cpu'] log = content['log'] score = int(content['score']) - ip = flask.request.remote_addr - - if ip == '': - ip = '0.0.0.0' + ip = "0.0.0.0" # Extra validators if score <= 0: