chiark / gitweb /
*** empty log message ***
[userv-utils.git] / www-cgi / user-cgi.text
index 88676ea9acc7ee147f9bc31d1b6ef92a47ecbd19..d97f156a14a85b3e6570db1d03c9186d06f5ccd4 100644 (file)
@@ -1,23 +1,17 @@
-Users can now arrange to have CGI scripts run by chiark's webserver.
-This is achieved using userv (see /info/new 183, /usr/doc/userv and
+Users can arrange to have CGI scripts run by the webserver.
+This is achieved using userv (see
 <URL:http://www.chiark.greenend.org.uk/~ian/userv/>).
 
 Before you write such scripts you should be aware of the security
-issues involved.  Please read /info/cgi-security.text !
+issues involved.
 
-Note that public-cgi programs (and their source code) should be world
-readable, and in any case by creating them you give me implicit
-permission to read its contents, using my system privilege if
-necessary, without notifying you.  See cgi-security.text for full
-details of the policy.
-
-Paths in chiark's http space of the form
+Paths in the http space of the form
   /ucgi/~<username>/<path-to-script>/<extra-stuff>...
 will be taken to refer to the CGI script
   ~<username>/public-cgi/<path-to-script>
 and /<extra-stuff> will be used as the PATH_INFO (as is
 conventional).  For example,
-  http://www.chiark.greenend.org.uk/ucgi/~ijackson/spong/foo?bar=baz
+  http://www.example.com/ucgi/~ijackson/spong/foo?bar=baz
 will run ~ijackson/public-cgi/spong with PATH_INFO set to `/foo' and
 QUERY_STRING set to `bar=baz'.
 
@@ -27,12 +21,9 @@ which will return a text/plain document consisting of the standard
 output and standard error of your script and a line at the bottom with
 the high and low bytes of the script's exit status.
 
-Also both of
- http://www.chiark.greenend.org.uk/ucgicgi/check
- http://www.chiark.greenend.org.uk/ucgi/~ijackson/check
-are scripts which will dump their arguments and environment as a
-text/plain output file.  This can be used to see what input your CGI
-program ought to expect.
+Also, /usr/local/lib/user-cgi/cgi/check is a script which will dump
+its arguments and environment as a text/plain output file.  This can
+be used to see what input your CGI program ought to expect.
 
 The default configuration does not enable userv's `set-environment'
 feature, so the environment your scripts in will be rather minimal.
@@ -50,10 +41,9 @@ and other similar variables will be set correctly (see below) and can
 and should be trusted.
 
 However, their arguments, input and webserver-provided environment
-variables (the full list is in /usr/local/src/davenant/ucgicommon.c)
-will have come from the client WWW browser and are highly
-untrustworthy.  This means you must be very careful when writing such
-programs.  Beware particularly of
+variables (the full list is in ucgicommon.c) will have come from the
+client WWW browser and are highly untrustworthy.  This means you must
+be very careful when writing such programs.  Beware particularly of
   * buffer overruns in C
   * trusting data not to have metacharacters.
     You should generally not pass client-provided data to
@@ -65,7 +55,8 @@ programs.  Beware particularly of
 Safely using untrusted client-provided data in shell scripts is very
 difficult.  I would recommend against programming CGI scripts in
 shell.  If you must, make sure you use appropriate quoting and
-argument unparsing everywhere.
+argument unparsing everywhere (and don't do it if you don't know what
+I mean by argument unparsing).
 
 The invocation of user-provided CGI scripts is achieved by using userv
 to invoke the `www-cgi' service.  The webserver-provided environment
@@ -90,7 +81,24 @@ You can run your own scripts from the command line by saying
 CGI programs' path components may not be empty, may not start with a
 full stop `.', and may not end with a hash `#' or tilde `~'.
 
-Please report problems to webmaster@chiark or sysadmin@chiark.
-Comments on userv should go to userv-maint@chiark.greenend.org.uk.
+It is important that the webserver removes /../ components from the
+PATH_INFO - if it doesn't there is a security hole.
+
+
+Copyright (C) 1998-1999,2003 Ian Jackson
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with userv-utils; if not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
- - Ian Jackson 14.07.1998
+$Id$