Index: timthumb.php
===================================================================
--- timthumb.php (revision 468863)
+++ timthumb.php (working copy)
@@ -20,7 +20,9 @@
a new version of timthumb.
*/
-define ('VERSION', '2.8'); // Version of this script
+define ('VERSION', '2.8');
+define( 'ALLOW_ALL_EXTERNAL_SITES', true );
+// Version of this script
//Load a config file if it exists. Otherwise, use the values below.
if( file_exists('timthumb-config.php')) require_once('timthumb-config.php');
if(! defined( 'DEBUG_ON' ) ) define ('DEBUG_ON', false); // Enable debug logging to web server error log (STDERR)
@@ -215,15 +217,23 @@
return false;
exit(0);
}
+ // Don't do this
+ /*(
if(preg_match('/https?:\/\/(?:www\.)?' . $this->myHost . '(?:$|\/)/i', $this->src)){
$this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src);
}
+ */
+
if(preg_match('/^https?:\/\/[^\/]+/i', $this->src)){
$this->debug(2, "Is a request for an external URL: " . $this->src);
$this->isURL = true;
} else {
$this->debug(2, "Is a request for an internal file: " . $this->src);
}
+
+ // Manually set isURL to true
+ $this->isURL = true;
+
if($this->isURL && (! ALLOW_EXTERNAL)){
$this->error("You are not allowed to fetch images from an external website.");
return false;
Index: cac-featured-content.php
===================================================================
--- cac-featured-content.php (revision 468863)
+++ cac-featured-content.php (working copy)
@@ -441,6 +441,8 @@
$resource_title = $instance['resource_title'];
$resource_image_source = $instance['resource_image_source'];
+ $this->instance = $instance;
+
/********************
*****Form Data******
*********************/
@@ -507,7 +509,10 @@
getBlogDomainField($blog_domain, true);
?>
+
+
+
pluginDomain ) ?>
@@ -523,45 +528,42 @@
?>
You can choose to use an image with an external source, or select an image from the media library.
-
+
+
+
id; //NOTE #1: the widget id is added here to allow uploader to only return array if this is used with image widget so that all other uploads are not harmed.
- $image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src");
- $image_title = __(($instance['image'] ? 'Change Image' : 'Add Image'), $this->pluginDomain);
- ?>
-
-
instance;
+
+ $media_upload_iframe_src = "media-upload.php?type=image&widget_id=".$this->id; //NOTE #1: the widget id is added here to allow uploader to only return array if this is used with image widget so that all other uploads are not harmed.
+ $image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src");
+ $image_title = __(($instance['image'] ? 'Change Image' : 'Add Image'), $this->pluginDomain);
+
+ $image_markup = !empty( $instance['imageurl'] ) ? '' : '';
+
+ $out = '