--- 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);