summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2009-11-26 13:57:51 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2009-11-26 13:58:14 +0100
commit9b5e88e855c901593b6c0b915abb39a5e3a9c4f1 (patch)
treebd09f351e2cb9f400edaba108934df92054ce0aa
parentda8acd0a54c59604d405b74b101961abcc8e4f1d (diff)
Read the password from a file.
-rw-r--r--logikorr.lisp7
1 files changed, 6 insertions, 1 deletions
diff --git a/logikorr.lisp b/logikorr.lisp
index a6d6fa4..594e140 100644
--- a/logikorr.lisp
+++ b/logikorr.lisp
@@ -16,6 +16,11 @@
(defvar *database* (merge-pathnames "blatt3.txt" *directory*))
(defvar *lock* (merge-pathnames #p".mulk-db-lock" *database*))
+(defvar *password-file* (merge-pathnames #p"password.txt" *directory*))
+(defvar *password*
+ (with-open-file (in *password-file* :direction :input)
+ (read-line in)))
+
(setq *hunchentoot-default-external-format*
(flexi-streams:make-external-format :utf-8))
@@ -25,7 +30,7 @@
(defun call-with-authentication (thunk)
(multiple-value-bind (name password)
(authorization)
- (if (and (string= name "test") (string= password "test"))
+ (if (and (string= name "logik") (string= password *password*))
(funcall thunk)
(progn
(require-authorization "Logik-Ergebniseingabe")))))