Version Description
- Fix for unchecked extension of uploaded files
Download this release
Release Info
Developer | tariquesani |
Plugin | Auto Post Thumbnail |
Version | 3.4.1 |
Comparing to | |
See all releases |
Code changes from version 3.4.0 to 3.4.1
- auto-post-thumbnail.php +8 -1
- readme.txt +5 -2
auto-post-thumbnail.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Auto Post Thumbnail
|
5 |
Plugin URI: http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-thumbnail/
|
6 |
Description: Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post (or any custom post type) only if Post Thumbnail is not set manually.
|
7 |
-
Version: 3.
|
8 |
Author: Aditya Mooley <adityamooley@sanisoft.com>, Tarique Sani <tarique@sanisoft.com>
|
9 |
Author URI: http://www.sanisoft.com/blog/author/adityamooley/
|
10 |
Modified by Dr. Tarique Sani <tarique@sanisoft.com> to make it work with Wordpress 3.4
|
@@ -361,6 +361,13 @@ function apt_generate_post_thumb($matches, $key, $post_content, $post_id)
|
|
361 |
return null;
|
362 |
}
|
363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
file_put_contents($new_file, $file_data);
|
365 |
|
366 |
// Set correct file permissions
|
4 |
Plugin Name: Auto Post Thumbnail
|
5 |
Plugin URI: http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-automatic-post-thumbnail/
|
6 |
Description: Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post (or any custom post type) only if Post Thumbnail is not set manually.
|
7 |
+
Version: 3.4.1
|
8 |
Author: Aditya Mooley <adityamooley@sanisoft.com>, Tarique Sani <tarique@sanisoft.com>
|
9 |
Author URI: http://www.sanisoft.com/blog/author/adityamooley/
|
10 |
Modified by Dr. Tarique Sani <tarique@sanisoft.com> to make it work with Wordpress 3.4
|
361 |
return null;
|
362 |
}
|
363 |
|
364 |
+
//Fix for checking file extensions
|
365 |
+
$exts = explode(".",$filename);
|
366 |
+
if(count($exts)>2)return null;
|
367 |
+
$allowed=get_allowed_mime_types();
|
368 |
+
$ext=pathinfo($new_file,PATHINFO_EXTENSION);
|
369 |
+
if(!array_key_exists($ext,$allowed))return null;
|
370 |
+
|
371 |
file_put_contents($new_file, $file_data);
|
372 |
|
373 |
// Set correct file permissions
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: tariquesani
|
3 |
Tags: Post, thumbnail, automatic, posts, featured image, image, featured, images, admin
|
4 |
Requires at least: 3.6.1
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 3.4.
|
7 |
|
8 |
Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post or any custom post type only if Post Thumbnail is not set manually.
|
9 |
|
@@ -27,6 +27,9 @@ For more details, see http://www.sanisoft.com/blog/2010/04/19/wordpress-plugin-a
|
|
27 |
|
28 |
== Changelog ==
|
29 |
|
|
|
|
|
|
|
30 |
= 3.4.0 =
|
31 |
* Tested with the latest wordpress release.
|
32 |
|
2 |
Contributors: tariquesani
|
3 |
Tags: Post, thumbnail, automatic, posts, featured image, image, featured, images, admin
|
4 |
Requires at least: 3.6.1
|
5 |
+
Tested up to: 4.6.x
|
6 |
+
Stable tag: 3.4.1
|
7 |
|
8 |
Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post or any custom post type only if Post Thumbnail is not set manually.
|
9 |
|
27 |
|
28 |
== Changelog ==
|
29 |
|
30 |
+
= 3.4.1 =
|
31 |
+
* Fix for unchecked extension of uploaded files
|
32 |
+
|
33 |
= 3.4.0 =
|
34 |
* Tested with the latest wordpress release.
|
35 |
|