summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-09-14 10:54:46 +0200
committerRoberto Hueso Gómez <rhueso@soleta.eu>2020-09-14 10:54:46 +0200
commit9df3c538f337d9c01b735e141fd2ab040724d73c (patch)
tree01bc391fc297e2332d09c8bed22b426c4127bff0
parent19be0f87de1b0ab064e3f058c45313cbe12428a8 (diff)
Fix parse_ips(...) function to avoid parsing CSFR
This avoids trying to parse CSFT token as an IP.
-rw-r--r--ogcp/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 4086a10..2bb4713 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -6,8 +6,9 @@ from ogcp import app
def parse_ips(checkboxes_dict):
ips = set()
- for ips_list in checkboxes_dict.values():
- ips.update(ips_list.split(' '))
+ for key, ips_list in checkboxes_dict.items():
+ if key != 'csrf_token':
+ ips.update(ips_list.split(' '))
return ips
@app.before_request