Allowed paths for file url, closes #7746

This commit is contained in:
Claudio Sanches 2015-03-17 14:20:51 -03:00
parent 4f7e59e743
commit f058d43556
1 changed files with 1 additions and 1 deletions

View File

@ -1233,7 +1233,7 @@ class WC_Meta_Box_Product_Data {
for ( $i = 0; $i < $file_url_size; $i ++ ) { for ( $i = 0; $i < $file_url_size; $i ++ ) {
if ( ! empty( $file_urls[ $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_name = wc_clean( $file_names[ $i ] );
$file_hash = md5( $file_url ); $file_hash = md5( $file_url );
$files[ $file_hash ] = array( $files[ $file_hash ] = array(