From f058d43556d2986dd2191b7664893532a990206b Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 17 Mar 2015 14:20:51 -0300 Subject: [PATCH] Allowed paths for file url, closes #7746 --- includes/admin/meta-boxes/class-wc-meta-box-product-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php index f223d9731d0..fbc648006e0 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php @@ -1233,7 +1233,7 @@ class WC_Meta_Box_Product_Data { for ( $i = 0; $i < $file_url_size; $i ++ ) { if ( ! empty( $file_urls[ $i ] ) ) { - $file_url = 0 === strpos( $file_urls[ $i ], '[' ) ? wc_clean( $file_urls[ $i ] ) : esc_url_raw( $file_urls[ $i ] ); + $file_url = ( 0 === strpos( $file_urls[ $i ], '[' ) && 0 !== strpos( $file_urls[ $i ], 'http' ) ) ? wc_clean( $file_urls[ $i ] ) : esc_url_raw( $file_urls[ $i ] ); $file_name = wc_clean( $file_names[ $i ] ); $file_hash = md5( $file_url ); $files[ $file_hash ] = array(