[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torouter/master] Fix XSRF



commit 107256ba90d51bd5c981cf0b167f68c8f64d652c
Author: Arturo FilastoÌ? <hellais@xxxxxxxxxxxxxx>
Date:   Fri Aug 19 16:03:50 2011 +0200

    Fix XSRF
---
 packages/torouter-web/src/tui/controllers/tor.py |   13 ++++++++-----
 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())
 
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits