aboutsummaryrefslogtreecommitdiffstats
path: root/packages/torouter-web/src/tui
diff options
context:
space:
mode:
authorArturo FilastoĢ€ <hellais@torproject.org>2011-08-19 16:03:50 +0200
committerArturo FilastoĢ€ <hellais@torproject.org>2011-08-19 16:03:50 +0200
commit107256ba90d51bd5c981cf0b167f68c8f64d652c (patch)
tree77c0b3e256d5a39e77a53dc98dbfb40b30c91265 /packages/torouter-web/src/tui
parent2ec2f16558d474ba517d9a2ce337a79c3be55a9d (diff)
downloadtorouter-107256ba90d51bd5c981cf0b167f68c8f64d652c.tar.gz
torouter-107256ba90d51bd5c981cf0b167f68c8f64d652c.zip
Fix XSRF
Diffstat (limited to 'packages/torouter-web/src/tui')
-rw-r--r--packages/torouter-web/src/tui/controllers/tor.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/torouter-web/src/tui/controllers/tor.py b/packages/torouter-web/src/tui/controllers/tor.py
index bc66623..491c6b7 100644
--- a/packages/torouter-web/src/tui/controllers/tor.py
+++ b/packages/torouter-web/src/tui/controllers/tor.py
@@ -37,10 +37,13 @@ class torrc:
return render.base(render.torconfig(output))
def POST(self):
- self.update_config(web.input())
- trc = parsing.torrc(config.torrc_file)
- trc.parse()
- output = trc.html_output()
- return render.base(render.torstatus(output,config.torrc_file))
+ if session.is_logged() > 0:
+ self.update_config(web.input())
+ trc = parsing.torrc(config.torrc_file)
+ trc.parse()
+ output = trc.html_output()
+ return render.base(render.torstatus(output,config.torrc_file))
+ else:
+ return render.base(render.login())