Here is a more polite way of sending the patch, sorry
Index: src/helpers/passwd.py
===================================================================
--- src/helpers/passwd.py       (revision 8885)
+++ src/helpers/passwd.py       (working copy)
@@ -28,11 +28,11 @@
 #
 # -----------------------------------------------------------------------
 
-import base64
+from base64 import b16encode
 import md5
 
-username_in = raw_input('Enter username:')
-password_in = raw_input('Enter password:')
-password = md5.new(password_in + username_in)
-username = md5.new(username_in + password_in)
-print("'%s' : '%s'" % (base64.b32encode(username.digest()), 
base64.b32encode(password.digest())))
+username = raw_input('Enter username:')
+password = raw_input('Enter password:')
+password = crypt(password, '$1$'+ 'saltedflavor')
+password = md5.new(password)
+print("'%s' : '%s'" % (username, b16encode(password.digest())))
Index: src/www/web_types.py
===================================================================
--- src/www/web_types.py        (revision 8885)
+++ src/www/web_types.py        (working copy)
@@ -1,4 +1,4 @@
-# -*- coding: iso-8859-1 -*-
+# /bin/bash: indent: command not found
 # -----------------------------------------------------------------------
 # web_types.py - Classes useful for the web interface.
 # -----------------------------------------------------------------------
@@ -27,7 +27,7 @@
 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 #
 # -----------------------------------------------------------------------
-import base64
+from base64 import b16encode
 import md5
 
 import os, sys, time
@@ -107,13 +107,11 @@
         """
         print 'auth_user(self, username=\"%s\", password=\"%s\")' % (username, 
'******')
         realpass = config.WWW_USERS.get(username)
-        if not realpass:
-            md5user = md5.new(username + password)
-            realpass = config.WWW_USERS.get(base64.b32encode(md5user.digest()))
-            md5pass = md5.new(password + username)
-            password = base64.b32encode(md5pass.digest())
+        md5pass = md5.new(password)
         if realpass == password:
             return True
+        elif realpass == b16encode(md5pass.digest()):
+            return True
         else:
             return False
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to