dgaudet 98/07/20 09:40:41
Modified: src CHANGES src/os/emx Makefile.tmpl os.h Added: src/os/emx util_os2.c Log: plug "..." and other canonicalization holes under OS/2. Submitted by: Brian Havard Revision Changes Path 1.973 +3 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.972 retrieving revision 1.973 diff -u -r1.972 -r1.973 --- CHANGES 1998/07/20 16:37:05 1.972 +++ CHANGES 1998/07/20 16:40:37 1.973 @@ -1,4 +1,7 @@ Changes with Apache 1.3.2 + + *) SECURITY: Plug "..." and other canonicalization holes under OS/2. + [Brian Havard] *) PORT: implement serialized accepts for OS/2. [Brian Havard] 1.9 +1 -1 apache-1.3/src/os/emx/Makefile.tmpl Index: Makefile.tmpl =================================================================== RCS file: /export/home/cvs/apache-1.3/src/os/emx/Makefile.tmpl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.tmpl 1998/05/10 13:04:37 1.8 +++ Makefile.tmpl 1998/07/20 16:40:39 1.9 @@ -3,7 +3,7 @@ INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES) LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS) -OBJS= os.o os-inline.o +OBJS= os.o os-inline.o util_os2.o COPY= os.h os-inline.c LIB= libos.a 1.8 +1 -0 apache-1.3/src/os/emx/os.h Index: os.h =================================================================== RCS file: /export/home/cvs/apache-1.3/src/os/emx/os.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- os.h 1998/07/13 09:57:24 1.7 +++ os.h 1998/07/20 16:40:39 1.8 @@ -2,6 +2,7 @@ #define APACHE_OS_H #define PLATFORM "OS/2" +#define HAVE_CANONICAL_FILENAME /* * This file in included in all Apache source code. It contains definitions 1.1 apache-1.3/src/os/emx/util_os2.c Index: util_os2.c =================================================================== #define INCL_DOSFILEMGR #include <os2.h> #include "httpd.h" #include "http_log.h" API_EXPORT(char *)ap_os_canonical_filename(pool *pPool, const char *szFile) { char buf[HUGE_STRING_LEN]; char buf2[HUGE_STRING_LEN]; int rc, len; char *pos; /* Remove trailing slash unless it's a root directory */ strcpy(buf, szFile); len = strlen(buf); if (len > 3 && buf[len-1] == '/') buf[--len] = 0; rc = DosQueryPathInfo(buf, FIL_QUERYFULLNAME, buf2, HUGE_STRING_LEN); ap_assert(rc == 0); strlwr(buf2); /* Switch backslashes to forward */ for (pos=buf2; *pos; pos++) if (*pos == '\\') *pos = '/'; return ap_pstrdup(pPool, buf2); }