Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > main-testing-src > by-pkgid > f594f38123f03e80f0716f5860618556 > files > 18

php-5.2.11-0.1mdv2009.1.src.rpm

--- ext/imap/php_imap.c	2007-02-07 21:59:59.000000000 +0100
+++ ext/imap/php_imap.c.oden	2007-02-07 22:03:23.000000000 +0100
@@ -787,6 +787,9 @@
 	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);