cvs: /php3/functions link.c

From: Date: Sun, 28 Nov 1999 16:34:32 +0000
Subject: cvs: /php3/functions link.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-13225@lists.php.net to get a copy of this message
rasmus Sun Nov 28 11:34:32 1999 EDT Modified files: /php3/functions link.c Log: Check link() as well Index: php3/functions/link.c diff -u php3/functions/link.c:1.37 php3/functions/link.c:1.38 --- php3/functions/link.c:1.37 Sun Nov 28 11:23:55 1999 +++ php3/functions/link.c Sun Nov 28 11:34:32 1999 @@ -28,7 +28,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: link.c,v 1.37 1999/11/28 16:23:55 rasmus Exp $ */ +/* $Id: link.c,v 1.38 1999/11/28 16:34:32 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif @@ -159,6 +159,10 @@ convert_to_string(frompath); if (php3_ini.safe_mode && !_php3_checkuid(topath->value.str.val, 2)) { + RETURN_FALSE; + } + if (!strncasecmp(topath->value.str.val,"http://",7) || !strncasecmp(topath->value.str.val,"ftp://",6)) { + php3_error(E_WARNING, "Unable to link to a URL"); RETURN_FALSE; }

« previous php.dev (#13225) next »