From 9b5e88e855c901593b6c0b915abb39a5e3a9c4f1 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 26 Nov 2009 13:57:51 +0100 Subject: Read the password from a file. --- logikorr.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"))))) -- cgit v1.2.3