Ticket #32173: 32173.diff
File 32173.diff, 1.3 KB (added by , 10 years ago) |
---|
-
src/wp-admin/includes/class-wp-press-this.php
642 642 $data = array(); 643 643 644 644 // Only instantiate the keys we want. Sanity check and sanitize each one. 645 foreach ( array( 'u', 's', 't', 'v' ) as $key ) {645 foreach ( array( 'u', 's', 't', 'v', 'i' ) as $key ) { 646 646 if ( ! empty( $_POST[ $key ] ) ) { 647 647 $value = wp_unslash( $_POST[ $key ] ); 648 648 } else if ( ! empty( $_GET[ $key ] ) ) { … … 651 651 continue; 652 652 } 653 653 654 if ( 'u' === $key) {655 $value = $this->_limit_url( $value );654 if ( in_array( $key, array( 'u', 'i' ) ) ) { 655 $value = ( 'i' === $key ) ? $this->_limit_img( $value ) : $this->_limit_url( $value ); 656 656 657 657 if ( preg_match( '%^(?:https?:)?//[^/]+%i', $value, $domain_match ) ) { 658 658 $this->domain = $domain_match[0]; … … 955 955 public function get_images( $data ) { 956 956 $selected_images = array(); 957 957 958 if ( ! empty( $data['i'] ) ) { 959 $data['_images'][] = $data['i']; // Already gone through _limit_img() in merge_or_fetch_data() 960 } 961 958 962 if ( ! empty( $data['_images'] ) ) { 959 963 foreach( $data['_images'] as $src ) { 960 964 if ( false !== strpos( $src, 'gravatar.com' ) ) {