CVS update: php31/main

From: Date: Fri, 11 Sep 1998 23:51:28 +0000
Subject: CVS update: php31/main
Groups: php.dev 
Request: Send a blank email to php-dev+get-988@lists.php.net to get a copy of this message
Date: Friday September 11, 1998 @ 19:51 Author: zeev Update of /repository/php31/main In directory asf:/u2/tmp/cvs-serv27655/main Modified Files: fopen-wrappers.c Log Message: URL password stripping patch Index: php31/main/fopen-wrappers.c diff -c php31/main/fopen-wrappers.c:2.4 php31/main/fopen-wrappers.c:2.5 *** php31/main/fopen-wrappers.c:2.4 Sun Sep 6 17:34:35 1998 --- php31/main/fopen-wrappers.c Fri Sep 11 19:51:28 1998 *************** *** 27,33 **** | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ ! /* $Id: fopen-wrappers.c,v 2.4 1998/09/06 21:34:35 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" --- 27,33 ---- | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ ! /* $Id: fopen-wrappers.c,v 2.5 1998/09/11 23:51:28 zeev Exp $ */ #ifdef THREAD_SAFE #include "tls.h" *************** *** 872,890 **** return (!strncasecmp(path, "http://", 7) || !strncasecmp(path, "ftp://", 6)); } ! PHPAPI char *php3_strip_url_passwd(char *path) { ! char *tmppath = NULL; ! if (!strncasecmp(path, "ftp://", 6)) { ! tmppath = path; ! tmppath += 6; ! for (; *tmppath != ':' && *tmppath != '\0'; tmppath++); ! tmppath++; ! for (; *tmppath != '@' && *tmppath != '\0'; tmppath++) ! *tmppath = '*'; } ! return (path); } PHPAPI char *expand_filepath(char *filepath) --- 872,910 ---- return (!strncasecmp(path, "http://", 7) || !strncasecmp(path, "ftp://", 6)); } ! ! ! PHPAPI char *php3_strip_url_passwd(char *url) { ! register char *p = url, *url_start; ! ! while (*p) { ! if (*p==':' && *(p+1)=='/' && *(p+2)=='/') { ! /* found protocol */ ! url_start = p = p+3; ! ! while (*p) { ! if (*p=='@') { ! int i; ! ! for (i=0; i<3 && url_start<p; i++, url_start++) { ! *url_start = '.'; ! } ! for (; *p; p++) { ! *url_start++ = *p; ! } ! *url_start=0; ! break; ! } ! p++; ! } ! return url; ! } ! p++; } ! return url; } + PHPAPI char *expand_filepath(char *filepath) -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#988) next »