Changeset 3268074
- Timestamp:
- 04/07/2025 06:47:00 PM (12 months ago)
- Location:
- wise-chat/trunk
- Files:
-
- 4 edited
-
readme.txt (modified) (2 diffs)
-
src/services/WiseChatAttachmentsService.php (modified) (2 diffs)
-
src/services/WiseChatImagesService.php (modified) (2 diffs)
-
wise-chat-core.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wise-chat/trunk/readme.txt
r3216633 r3268074 6 6 Requires PHP: 5.2.0 7 7 Tested up to: 6.7.1 8 Stable tag: 3.3. 28 Stable tag: 3.3.3 9 9 License: LGPLv2 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 406 406 == Changelog == 407 407 408 = 3.3.3 = 409 * Security: prevent listing directories with uploaded images or attachments 410 408 411 = 3.3.2 = 409 412 * Fixed: breaking the site with Elementor installed -
wise-chat/trunk/src/services/WiseChatAttachmentsService.php
r3102462 r3268074 253 253 ); 254 254 wp_update_post($postUpdate); 255 256 $this->ensureProtectionMeasures($attachmentId); 255 257 } 256 258 … … 349 351 } 350 352 } 353 354 private function ensureProtectionMeasures(int $attachmentId) { 355 $fullSizePath = get_attached_file($attachmentId); 356 $directory = dirname($fullSizePath); 357 if (!is_dir($directory) || !is_writable($directory)) { 358 return; 359 } 360 $htaccessPath = rtrim($directory, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'.htaccess'; 361 if (!file_exists($htaccessPath)) { 362 file_put_contents($htaccessPath, 'Options All -Indexes'); 363 } 364 } 351 365 352 366 } -
wise-chat/trunk/src/services/WiseChatImagesService.php
r3102462 r3268074 297 297 ); 298 298 wp_update_post($postUpdate); 299 300 $this->ensureProtectionMeasures($attachmentId); 299 301 } 300 302 … … 391 393 @trigger_error('WordPress Wise Chat plugin error (ImagesService): '.$message, E_USER_NOTICE); 392 394 } 395 396 private function ensureProtectionMeasures(int $attachmentId) { 397 $fullSizePath = get_attached_file($attachmentId); 398 $directory = dirname($fullSizePath); 399 if (!is_dir($directory) || !is_writable($directory)) { 400 return; 401 } 402 $htaccessPath = rtrim($directory, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'.htaccess'; 403 if (!file_exists($htaccessPath)) { 404 file_put_contents($htaccessPath, 'Options All -Indexes'); 405 } 406 } 393 407 394 408 } -
wise-chat/trunk/wise-chat-core.php
r3216633 r3268074 2 2 /* 3 3 Plugin Name: Wise Chat 4 Version: 3.3. 24 Version: 3.3.3 5 5 Plugin URI: https://kainex.pl/projects/wp-plugins/wise-chat 6 6 Description: Fully-featured chat plugin for WordPress. Supports multiple channels, private messages, multisite installation, bad words filtering, themes, appearance settings, avatars, filters, bans and more. … … 10 10 */ 11 11 12 define('WISE_CHAT_VERSION', '3.3. 2');12 define('WISE_CHAT_VERSION', '3.3.3'); 13 13 define('WISE_CHAT_ROOT', plugin_dir_path(__FILE__)); 14 14 define('WISE_CHAT_NAME', 'Wise Chat');
Note: See TracChangeset
for help on using the changeset viewer.