Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > d27673e6001a0f733a6f96b690c748b4 > files > 29

php4-4.4.6-3mdv2007.1.src.rpm

--- ext/imap/php_imap.c	2006-08-26 15:03:47.000000000 +0200
+++ ext/imap/php_imap.c.oden	2006-08-26 15:08:19.000000000 +0200
@@ -756,6 +756,11 @@
 	convert_to_string_ex(mailbox);
 	convert_to_string_ex(user);
 	convert_to_string_ex(passwd);
+	
+	if ((PG(open_basedir) && *PG(open_basedir) || PG(safe_mode)) &&
+	        (!php_checkuid(mailbox, NULL, CHECKUID_CHECK_FILE_AND_DIR)))
+	        RETURN_FALSE;
+	        
 	if (myargc ==4) {
 		convert_to_long_ex(options);
 		flags = Z_LVAL_PP(options);