cvs: php4(PHP_4_2_0) /ext/standard mail.c

From: Date: Fri, 23 Aug 2002 23:48:48 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/standard mail.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13616@lists.php.net to get a copy of this message
zeev Fri Aug 23 19:48:48 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/standard mail.c Log: MFH security fix Index: php4/ext/standard/mail.c diff -u php4/ext/standard/mail.c:1.48.2.1 php4/ext/standard/mail.c:1.48.2.2 --- php4/ext/standard/mail.c:1.48.2.1 Sun Jun 23 13:22:52 2002 +++ php4/ext/standard/mail.c Fri Aug 23 19:48:48 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c,v 1.48.2.1 2002/06/23 17:22:52 sesser Exp $ */ +/* $Id: mail.c,v 1.48.2.2 2002/08/23 23:48:48 zeev Exp $ */ #include <stdlib.h> #include <ctype.h> @@ -72,6 +72,10 @@ char *to=NULL, *message=NULL, *headers=NULL, *subject=NULL, *extra_cmd=NULL; int to_len,message_len,headers_len,subject_len,extra_cmd_len,i; + if (PG(safe_mode) && (ZEND_NUM_ARGS() == 5)) { + php_error(E_WARNING, "%s(): SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE.", get_active_function_name(TSRMLS_C)); + RETURN_FALSE; + } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|ss", &to, &to_len,

« previous php.cvs (#13616) next »