projects
/
rrq
/
hourglass.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixes; first version
[rrq/hourglass.git]
/
manager
/
basic_login.lsp
diff --git
a/manager/basic_login.lsp
b/manager/basic_login.lsp
index 38b7ac490b56a7ef827c6ac8f5e5b7808825c527..c4488d37936be306457b5baebc1e738728f16763 100644
(file)
--- a/
manager/basic_login.lsp
+++ b/
manager/basic_login.lsp
@@
-7,27
+7,29
@@
;; this file as a packnl embedding that will use that X part of its
;; name to determine th actual script.
;; this file as a packnl embedding that will use that X part of its
;; name to determine th actual script.
-(load "siteconfig.lsp")
-
-(write-line 2 (string (date-value) " " (main-args)))
+;(write-line 2 (string (date-value) " " (main-args)))
(unless (ends-with (main-args 0) ".cgi")
(unless (ends-with (main-args 0) ".cgi")
+ (load "siteconfig.lsp")
(if (exists file? (list (main-args 1)
(string (main-args 1) ".lsp")))
(load $it)
(write-line 2 (string "Unknown command " (main-args 1))))
(exit 0))
(if (exists file? (list (main-args 1)
(string (main-args 1) ".lsp")))
(load $it)
(write-line 2 (string "Unknown command " (main-args 1))))
(exit 0))
-
;; This script is executed in (protected) subdirectory www
(change-dir "..")
;; This script is executed in (protected) subdirectory www
(change-dir "..")
+(load "siteconfig.lsp")
+
;; Needs an HTTP_AUTHORIZATION environment variable
(when (empty? (setf AUTH (env "HTTP_AUTHORIZATION")))
;; Needs an HTTP_AUTHORIZATION environment variable
(when (empty? (setf AUTH (env "HTTP_AUTHORIZATION")))
+ ;(write-line 2 "needs auth")
(write-line 1 (read-file "tmpl/unauthorized.http"))
(exit 0))
(write-line 1 (read-file "tmpl/unauthorized.http"))
(exit 0))
-;; Must find that value in .htpasswd
-(unless (ref (6 AUTH) (parse (read-file ".htpasswd") "\n"))
+;; Must find that value in wui.passwd
+(constant 'PASSWD SITE:wui.passwd)
+(unless (ref (6 AUTH) (parse (read-file PASSWD) "\n"))
(write-line 1 (read-file "tmpl/unauthorized.http"))
(exit 0))
(write-line 1 (read-file "tmpl/unauthorized.http"))
(exit 0))
@@
-41,11
+43,12
@@
SCRIPT (role-script)
)
(env "REMOTE_USER" REMOTE_USER)
SCRIPT (role-script)
)
(env "REMOTE_USER" REMOTE_USER)
-(env "ROLE" ROLE)
+
;
(env "ROLE" ROLE)
(unless (file? SCRIPT)
(write 1 "\nBroken.\n")
(exit 0))
(unless (file? SCRIPT)
(write 1 "\nBroken.\n")
(exit 0))
+;(write-line 2 (string (list "script" SCRIPT)))
(load SCRIPT)
(exit 0)
(load SCRIPT)
(exit 0)