[hackers] [diri] implemented/documented some other remarks by bogon

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Mon Feb 12 09:39:21 2007

changeset: 60:3fc61d6fa5b2
tag: tip
user: Anselm R. Garbe <arg_AT_suckless.org>
date: Mon Feb 12 09:38:56 2007 +0100
summary: implemented/documented some other remarks by bogon

diff -r 000147f97671 -r 3fc61d6fa5b2 README
--- a/README Mon Feb 12 09:27:53 2007 +0100
+++ b/README Mon Feb 12 09:38:56 2007 +0100
@@ -26,14 +26,24 @@ Edit the {edit,show}.rc files and dirirc
   contrib/markdown.pl contrib/urldecode.awk
 
 to the customized location. Make sure they are executable.
+
+Note, DIRIDIR should not point to the directory where the diri scripts are
+located.
+
 Afterwards perform following steps:
 
   cp *rc /var/www/
   mkdir /var/www/diri
- chmod 777 /var/www/diri
+ chmod 700 /var/www/diri
+
+Make sure that .rc files are handled as CGI-executables in your webserver
+setup.
 
 Then open the following URL in a browser:
 
- http://<your-host>/
+ http://<your-host>/show.rc
+
+It might be advantageous if you extend your webserver setup with symbolic
+rewrite URLs hiding the CGI scripts.
 
 --Anselm
diff -r 000147f97671 -r 3fc61d6fa5b2 remove.rc
--- a/remove.rc Mon Feb 12 09:27:53 2007 +0100
+++ b/remove.rc Mon Feb 12 09:38:56 2007 +0100
@@ -18,8 +18,7 @@ fn setvars {
         }
 }
 
-if(! test $PATH_INFO || echo $PATH_INFO | grep -v -s '^[a-zA-Z0-9_/]+$'
- || echo $PATH_INFO | grep -v -s '[a-zA-Z0-9]')
+if(! test $PATH_INFO || echo $PATH_INFO | grep -v -s '^[a-zA-Z0-9_/]+$')
         redirect $SHOW
 PATH_INFO=`{cleanname $PATH_INFO | sed 's/^.//'}
 setvars password
diff -r 000147f97671 -r 3fc61d6fa5b2 save.rc
--- a/save.rc Mon Feb 12 09:27:53 2007 +0100
+++ b/save.rc Mon Feb 12 09:38:56 2007 +0100
@@ -18,12 +18,11 @@ fn setvars {
         }
 }
 
-if(! test $PATH_INFO || echo $PATH_INFO | grep -v -s '^[a-zA-Z0-9_/]+$'
- || echo $PATH_INFO | grep -v -s '[a-zA-Z0-9]')
+if(! test $PATH_INFO || echo $PATH_INFO | grep -v -s '^[a-zA-Z0-9_/]+$')
         redirect $SHOW
 PATH_INFO=`{cleanname $PATH_INFO | sed 's/^.//'}
 if(test -d $DIRIDIR/$PATH_INFO)
- escape
+ redirect $SHOW/$PATH_INFO
 setvars password text
 if(test $password)
         password=`{echo -n $password | $URLDECODE | $HASHCMD}
Received on Mon Feb 12 2007 - 09:39:21 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:12 UTC