Don't always encrypt password; caller must do that explicitly.
authorChris Hanson <org/chris-hanson/cph>
Mon, 22 Nov 2004 19:45:27 +0000 (19:45 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 22 Nov 2004 19:45:27 +0000 (19:45 +0000)
v7/src/xdoc/db.scm
v7/src/xdoc/xdoc.pkg

index 95225feb963a9118b754e54ebeb8aad9220ed3ba..d372f9748a1cd2392453e2b6e7815a66d4f3cdeb 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: db.scm,v 1.2 2004/11/19 14:52:24 cph Exp $
+$Id: db.scm,v 1.3 2004/11/22 19:45:23 cph Exp $
 
 Copyright 2003,2004 Massachusetts Institute of Technology
 
@@ -609,7 +609,7 @@ USA.
                    " (" (db-quote user-name)
                    ", " (db-quote first-names)
                    ", " (db-quote last-name)
-                   ", " (db-quote (encrypt-password password))
+                   ", " (db-quote password)
                    ", " "FALSE"
                    ", " (if enabled? "TRUE" "FALSE")
                    ")")
@@ -618,7 +618,7 @@ USA.
 (define (db-change-user-password user-name password)
   (guarantee-known-user user-name)
   (db-run-cmd "UPDATE users"
-             " SET password = " (db-quote (encrypt-password password))
+             " SET password = " (db-quote password)
              " WHERE user_name = " (db-quote user-name)))
 \f
 (define (db-user-real-name user-name)
@@ -674,7 +674,7 @@ USA.
              " SET " flag-name " = " (if value "TRUE" "FALSE")
              " WHERE user_name = " (db-quote user-name)))
 \f
-(define (encrypt-password password)
+(define (db-encrypt-password password)
   (let ((pw-line
         (call-with-output-string
           (lambda (port)
index 9392ca151c05e1d355c5d5f29b82548e4e22b006..a19869fe692296ce134bacaa76d8e2d654569c19 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: xdoc.pkg,v 1.1 2004/11/01 19:21:05 cph Exp $
+$Id: xdoc.pkg,v 1.2 2004/11/22 19:45:27 cph Exp $
 
 Copyright 2004 Massachusetts Institute of Technology
 
@@ -185,6 +185,7 @@ USA.
          db-clear-submitter
          db-delete-global-value!
          db-delete-persistent-value!
+         db-encrypt-password
          db-generate-password
          db-get-global-value
          db-get-persistent-value