From 1107f63d47a90452a7c0bc39b087c74b4b4e8c50 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 19 Mar 2008 06:18:05 +0000 Subject: [PATCH] Disable flash uploader if mac and mod_security is enabled. Props andy. fixes #6278 git-svn-id: https://develop.svn.wordpress.org/trunk@7396 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 913717bab5..d37c483b90 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -778,6 +778,12 @@ function media_upload_form( $errors = null ) { $flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php"; + // If Mac and mod_security, no Flash. :( + if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && 'on' == strtolower(apache_getenv('MODSEC_ENABLE')) ) + $flash = false; + else + $flash = true; + $post_id = intval($_REQUEST['post_id']); ?> @@ -787,6 +793,7 @@ function media_upload_form( $errors = null ) { get_error_message(); ?> +