Changeset 3364994
- Timestamp:
- 09/20/2025 01:51:44 PM (6 months ago)
- Location:
- podlove-podcasting-plugin-for-wordpress
- Files:
-
- 10 edited
- 1 copied
-
tags/4.2.7 (copied) (copied from podlove-podcasting-plugin-for-wordpress/trunk)
-
tags/4.2.7/lib/helper.php (modified) (1 diff)
-
tags/4.2.7/lib/model/image.php (modified) (3 diffs)
-
tags/4.2.7/podlove.php (modified) (1 diff)
-
tags/4.2.7/readme.txt (modified) (2 diffs)
-
tags/4.2.7/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/lib/helper.php (modified) (1 diff)
-
trunk/lib/model/image.php (modified) (3 diffs)
-
trunk/podlove.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
podlove-podcasting-plugin-for-wordpress/tags/4.2.7/lib/helper.php
r3088907 r3364994 83 83 * @return bool 84 84 */ 85 function is_image($file) 86 { 85 function is_image($file, $filename = "") 86 { 87 // simple PHP based checks 87 88 $type = get_image_type($file); 88 89 $mime = get_image_mime_type($type); 89 90 return substr($mime, 0, 5) == 'image'; 90 $mime_is_image = substr($mime, 0, 5) == 'image'; 91 92 // more checks using WP helpers 93 if (!$filename) { 94 $filename = basename($file); 95 } 96 97 $check = wp_check_filetype_and_ext($file, $filename); 98 $ext = isset($check['ext']) && $check['ext'] ? strtolower($check['ext']) : null; 99 $wp_type = isset($check['type']) && $check['type'] ? strtolower($check['type']) : null; 100 101 $wp_type_looks_correct = stripos($wp_type, 'image/') === 0; 102 103 // denielist some exts for extra safety 104 $danger_exts = [ 105 'php', 'php3', 'php4', 'php5', 'phtml', 'phar', 'pl', 'py', 'rb', 'cgi', 'asp', 'aspx', 'jsp', 106 ]; 107 108 $ext_looks_dangerous = empty($ext) || in_array($ext, $danger_exts, true); 109 110 return $mime_is_image && !$ext_looks_dangerous && $wp_type_looks_correct; 91 111 } 92 112 -
podlove-podcasting-plugin-for-wordpress/tags/4.2.7/lib/model/image.php
r3195601 r3364994 312 312 public function generate_resized_copy() 313 313 { 314 if (!\Podlove\is_image($this->original_file() )) {314 if (!\Podlove\is_image($this->original_file(), basename($this->source_url))) { 315 315 Log::get()->addWarning('Podlove Image Cache: Not an image ('.$this->original_file().')'); 316 316 … … 390 390 $file = untrailingslashit(\Podlove\PLUGIN_DIR).$path; 391 391 392 if (file_exists($file) && \Podlove\is_image($file )) {392 if (file_exists($file) && \Podlove\is_image($file, basename($this->source_url))) { 393 393 $this->create_basedir(); 394 394 $this->save_cache_data(); … … 432 432 } 433 433 434 if (!\Podlove\is_image($temp_file )) {434 if (!\Podlove\is_image($temp_file, basename($this->source_url))) { 435 435 Log::get()->addWarning( 436 436 sprintf(__('Podlove Image Cache: Downloaded file is not an image.')), -
podlove-podcasting-plugin-for-wordpress/tags/4.2.7/podlove.php
r3348869 r3364994 3 3 * Plugin Name: Podlove Podcast Publisher 4 4 * Plugin URI: https://podlove.org/podlove-podcast-publisher/ 5 * Version: 4.2. 65 * Version: 4.2.7 6 6 * Requires at least: 4.9.6 7 7 * Requires PHP: 8.0 -
podlove-podcasting-plugin-for-wordpress/tags/4.2.7/readme.txt
r3348869 r3364994 4 4 Tags: podlove, podcast, publishing, rss, audio 5 5 Tested up to: 6.7.2 6 Stable tag: 4.2. 66 Stable tag: 4.2.7 7 7 Requires at least: 4.9.6 8 8 Requires PHP: 8.0 … … 115 115 116 116 == Changelog == 117 118 = 4.2.7 = 119 120 - security: Improved handling of image files in the download cache to block malicious uploads. 121 122 Note: this should not affect normal image delivery, but please keep an eye out for any unexpected issues with cached images. 117 123 118 124 = 4.2.6 = -
podlove-podcasting-plugin-for-wordpress/tags/4.2.7/vendor/composer/installed.php
r3348869 r3364994 2 2 'root' => array( 3 3 'name' => 'podlove/podcast-publisher', 4 'pretty_version' => '4.2. 6',5 'version' => '4.2. 6.0',6 'reference' => ' 09c3da96fd177090415eeeabb54a5035872b783d',4 'pretty_version' => '4.2.7', 5 'version' => '4.2.7.0', 6 'reference' => '67f7a6577bc27dd0d0bf11c7ae715ea6c0d9dfc3', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 144 144 ), 145 145 'podlove/podcast-publisher' => array( 146 'pretty_version' => '4.2. 6',147 'version' => '4.2. 6.0',148 'reference' => ' 09c3da96fd177090415eeeabb54a5035872b783d',146 'pretty_version' => '4.2.7', 147 'version' => '4.2.7.0', 148 'reference' => '67f7a6577bc27dd0d0bf11c7ae715ea6c0d9dfc3', 149 149 'type' => 'library', 150 150 'install_path' => __DIR__ . '/../../', -
podlove-podcasting-plugin-for-wordpress/trunk/lib/helper.php
r3088907 r3364994 83 83 * @return bool 84 84 */ 85 function is_image($file) 86 { 85 function is_image($file, $filename = "") 86 { 87 // simple PHP based checks 87 88 $type = get_image_type($file); 88 89 $mime = get_image_mime_type($type); 89 90 return substr($mime, 0, 5) == 'image'; 90 $mime_is_image = substr($mime, 0, 5) == 'image'; 91 92 // more checks using WP helpers 93 if (!$filename) { 94 $filename = basename($file); 95 } 96 97 $check = wp_check_filetype_and_ext($file, $filename); 98 $ext = isset($check['ext']) && $check['ext'] ? strtolower($check['ext']) : null; 99 $wp_type = isset($check['type']) && $check['type'] ? strtolower($check['type']) : null; 100 101 $wp_type_looks_correct = stripos($wp_type, 'image/') === 0; 102 103 // denielist some exts for extra safety 104 $danger_exts = [ 105 'php', 'php3', 'php4', 'php5', 'phtml', 'phar', 'pl', 'py', 'rb', 'cgi', 'asp', 'aspx', 'jsp', 106 ]; 107 108 $ext_looks_dangerous = empty($ext) || in_array($ext, $danger_exts, true); 109 110 return $mime_is_image && !$ext_looks_dangerous && $wp_type_looks_correct; 91 111 } 92 112 -
podlove-podcasting-plugin-for-wordpress/trunk/lib/model/image.php
r3195601 r3364994 312 312 public function generate_resized_copy() 313 313 { 314 if (!\Podlove\is_image($this->original_file() )) {314 if (!\Podlove\is_image($this->original_file(), basename($this->source_url))) { 315 315 Log::get()->addWarning('Podlove Image Cache: Not an image ('.$this->original_file().')'); 316 316 … … 390 390 $file = untrailingslashit(\Podlove\PLUGIN_DIR).$path; 391 391 392 if (file_exists($file) && \Podlove\is_image($file )) {392 if (file_exists($file) && \Podlove\is_image($file, basename($this->source_url))) { 393 393 $this->create_basedir(); 394 394 $this->save_cache_data(); … … 432 432 } 433 433 434 if (!\Podlove\is_image($temp_file )) {434 if (!\Podlove\is_image($temp_file, basename($this->source_url))) { 435 435 Log::get()->addWarning( 436 436 sprintf(__('Podlove Image Cache: Downloaded file is not an image.')), -
podlove-podcasting-plugin-for-wordpress/trunk/podlove.php
r3348869 r3364994 3 3 * Plugin Name: Podlove Podcast Publisher 4 4 * Plugin URI: https://podlove.org/podlove-podcast-publisher/ 5 * Version: 4.2. 65 * Version: 4.2.7 6 6 * Requires at least: 4.9.6 7 7 * Requires PHP: 8.0 -
podlove-podcasting-plugin-for-wordpress/trunk/readme.txt
r3348869 r3364994 4 4 Tags: podlove, podcast, publishing, rss, audio 5 5 Tested up to: 6.7.2 6 Stable tag: 4.2. 66 Stable tag: 4.2.7 7 7 Requires at least: 4.9.6 8 8 Requires PHP: 8.0 … … 115 115 116 116 == Changelog == 117 118 = 4.2.7 = 119 120 - security: Improved handling of image files in the download cache to block malicious uploads. 121 122 Note: this should not affect normal image delivery, but please keep an eye out for any unexpected issues with cached images. 117 123 118 124 = 4.2.6 = -
podlove-podcasting-plugin-for-wordpress/trunk/vendor/composer/installed.php
r3348869 r3364994 2 2 'root' => array( 3 3 'name' => 'podlove/podcast-publisher', 4 'pretty_version' => '4.2. 6',5 'version' => '4.2. 6.0',6 'reference' => ' 09c3da96fd177090415eeeabb54a5035872b783d',4 'pretty_version' => '4.2.7', 5 'version' => '4.2.7.0', 6 'reference' => '67f7a6577bc27dd0d0bf11c7ae715ea6c0d9dfc3', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 144 144 ), 145 145 'podlove/podcast-publisher' => array( 146 'pretty_version' => '4.2. 6',147 'version' => '4.2. 6.0',148 'reference' => ' 09c3da96fd177090415eeeabb54a5035872b783d',146 'pretty_version' => '4.2.7', 147 'version' => '4.2.7.0', 148 'reference' => '67f7a6577bc27dd0d0bf11c7ae715ea6c0d9dfc3', 149 149 'type' => 'library', 150 150 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.