diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-03-08 14:14:49 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-03-08 14:14:49 +0000 |
commit | 35d67dd80aa3ba72b75683cb1f35c81066e21223 (patch) | |
tree | 946248a3dfaf9710586856ba20e82a0a661b2a61 /source3/cgi.c | |
parent | f3eeb2f1fa528b0d952d2519f719d30f4a2489fa (diff) | |
download | samba-35d67dd80aa3ba72b75683cb1f35c81066e21223.tar.gz samba-35d67dd80aa3ba72b75683cb1f35c81066e21223.tar.bz2 samba-35d67dd80aa3ba72b75683cb1f35c81066e21223.zip |
Jeremy is going to hate me ...
These are some hacks on SWAT. Maybe users will actually be able to
work out how to use it now.
Unfortunately these changes required some editing in loadparm.c and
smb.h which will make Jeremys merge job harder. Sorry!
(This used to be commit 674c88a6bf4c8009769a482c53f105efdc54bbc8)
Diffstat (limited to 'source3/cgi.c')
-rw-r--r-- | source3/cgi.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/cgi.c b/source3/cgi.c index ae60d72b7b..7c84f47ada 100644 --- a/source3/cgi.c +++ b/source3/cgi.c @@ -43,6 +43,7 @@ static int content_length; static int request_post; static int request_get; static char *query_string; +static char *baseurl; static void unescape(char *buf) { @@ -610,12 +611,20 @@ void cgi_setup(char *rootdir) *p = 0; } - if (strcmp(url,"/")) { + if (strstr(url+1,"..")==0 && file_exist(url+1)) { cgi_download(url+1); } printf("HTTP/1.1 200 OK\r\nConnection: close\r\n"); - + + baseurl = url+1; } +/*************************************************************************** +return the current pages URL + ***************************************************************************/ +char *cgi_baseurl(void) +{ + return baseurl; +} |