Commits

Anonymous committed dafe81c

Use SimpleCookie instead of Cookie.
Use neo_cgi when redirecting requests.

  • Participants
  • Parent commits 46d6da3
  • Branches trunk

Comments (0)

Files changed (3)

File svntrac/auth.py

 
 def authenticate_user ():
     flush_auth_cookies ()
-    #return
-    cookie = Cookie.Cookie(os.getenv('HTTP_COOKIE'))
+    cookie = Cookie.SimpleCookie(os.getenv('HTTP_COOKIE'))
     auth_cookie = create_auth_cookie (os.getenv('REMOTE_USER'),
                                       os.getenv('REMOTE_ADDR'))
     cookie['svntrac_auth'] = auth_cookie
 
 def verify_authentication (args):
     flush_auth_cookies ()
-    #return
-    cookie = Cookie.Cookie(os.getenv('HTTP_COOKIE'))
+    cookie = Cookie.SimpleCookie(os.getenv('HTTP_COOKIE'))
     remote_addr = os.getenv ('REMOTE_ADDR')
     
     if cookie.has_key('svntrac_auth'):

File svntrac/svntrac.py

 import Href
 
 warnings.filterwarnings('ignore', 'DB-API extension cursor.next() used')
-warnings.filterwarnings('ignore', 'DeprecationWarning: Cookie/SmartCookie class is insecure; do not use it')
 
 import db
 from auth import verify_authentication

File svntrac/util.py

     """
     redirects the user agent to a different url
     """
-    print 'Location: %s\r\n\r\n' % url
+    import neo_cgi
+    neo_cgi.CGI().redirect(url)
     sys.exit(0)
 
 def enum_selector (sql, name, selected=None,default_empty=0):