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

[tor-commits] [torouter/master] Add user name and password to config file



commit 423d7556b1af6159bc3a1d6219bcd0ec704dce7f
Author: Arturo FilastoÌ? <hellais@xxxxxxxxxxxxxx>
Date:   Thu Aug 11 18:21:48 2011 +0200

    Add user name and password to config file
---
 packages/torouter-web/README               |    1 +
 packages/torouter-web/config.py            |    1 +
 packages/torouter-web/tui/utils/session.py |    3 ++-
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/packages/torouter-web/README b/packages/torouter-web/README
index 7a8c0fa..60e1eeb 100644
--- a/packages/torouter-web/README
+++ b/packages/torouter-web/README
@@ -10,3 +10,4 @@ To start the web server run:
   python runui.py
 
 - Arturo Filasto' <hellais@xxxxxxxxxxxxxx>
+
diff --git a/packages/torouter-web/config.py b/packages/torouter-web/config.py
index 9411bb7..aff1f8b 100644
--- a/packages/torouter-web/config.py
+++ b/packages/torouter-web/config.py
@@ -8,4 +8,5 @@ cache = False
 
 globals = {}
 
+authinfo = ("test", "test")
 
diff --git a/packages/torouter-web/tui/utils/session.py b/packages/torouter-web/tui/utils/session.py
index 375b6bc..61c04cd 100644
--- a/packages/torouter-web/tui/utils/session.py
+++ b/packages/torouter-web/tui/utils/session.py
@@ -1,4 +1,5 @@
 import web
+import config
 
 # The main session class
   
@@ -15,7 +16,7 @@ def is_logged():
   return web.config._session.login
 
 def check_login(data):
-  if (data.user == "test") and (data.password == "test"):
+  if (data.user == config.authinfo[0]) and (data.password == config.authinfo[1]):
     web.config._session.login = 1
     return 0
   return 1



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