Changeset 3010222
- Timestamp:
- 12/14/2023 06:57:43 PM (2 years ago)
- Location:
- wp-editor/trunk
- Files:
-
- 7 edited
-
classes/WPEditorLog.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
uninstall.php (modified) (1 diff)
-
views/OLDsettings.php (modified) (1 diff)
-
views/plugin-editor.php (modified) (1 diff)
-
views/theme-editor.php (modified) (1 diff)
-
wpeditor.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-editor/trunk/classes/WPEditorLog.php
r1416069 r3010222 7 7 $date = date( 'm/d/Y g:i:s a', self::local_ts() ); 8 8 $header = strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) ? "\n\n======= ADMIN REQUEST =======\n[LOG DATE: $date $tz]\n" : "\n\n[LOG DATE: $date $tz]\n"; 9 $filename = WPEDITOR_PATH . '/log.txt'; 9 $log_file_name = self::get_log_file_name(); 10 $filename = WPEDITOR_PATH . '/'.$log_file_name.'-log.txt'; 10 11 if ( file_exists( $filename ) && is_writable( $filename ) ) { 11 12 file_put_contents( $filename, $header . $data, FILE_APPEND ); … … 46 47 47 48 public static function get_log_file_path() { 48 $log_file_path = WPEDITOR_PATH . '/log.txt'; 49 $log_file_name = self::get_log_file_name(); 50 $log_file_path = WPEDITOR_PATH . '/'.$log_file_name.'-log.txt'; 49 51 return $log_file_path; 50 52 } … … 58 60 return $exists; 59 61 } 62 63 public static function get_log_file_name() { 64 $log_file_option = 'wpe_log_file_name'; 65 $log_file_name = get_option($log_file_option); 66 if ( false === $log_file_name ) { 67 $log_file_name = bin2hex(random_bytes(8)); 68 add_option($log_file_option, $log_file_name); 69 } 70 return $log_file_name; 71 } 72 73 public static function get_log_file_url() { 74 return WPEDITOR_URL . self::get_log_file_name() . '-log.txt'; 75 } 60 76 61 77 } -
wp-editor/trunk/readme.txt
r2790812 r3010222 4 4 Tags: code editor, plugin editor, theme editor, page editor, post editor, pages, posts, html, codemirror, plugins, themes, editor, fancybox, post.php, post-new.php, ajax, syntax highlighting, html syntax highlighting 5 5 Requires at least: 3.9 6 Tested up to: 4.6.17 Stable tag: 1.2. 76 Tested up to: 6.4.2 7 Stable tag: 1.2.8 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 70 70 == Changelog == 71 71 72 = 1.2.8 = 73 * Randomize log file name 74 72 75 = 1.2.7 = 73 76 * Security release: fixes SQLi vulnerabilities. -
wp-editor/trunk/uninstall.php
r1416069 r3010222 9 9 10 10 global $wpdb; 11 delete_option('wpe_log_file_name'); 11 12 $prefix = WPEditor::get_table_prefix(); 12 13 $sqlFile = WPEDITOR_PATH . 'sql/uninstall.sql'; -
wp-editor/trunk/views/OLDsettings.php
r1416069 r3010222 97 97 <input type="radio" name="wpeditor_logging" value="1" <?php echo (WPEditorSetting::get_value( 'wpeditor_logging' ) == 1 ) ? 'checked="checked"' : ''; ?>> <?php _e( 'Yes', 'wp-editor' ); ?> 98 98 <input type="radio" name="wpeditor_logging" value="0" <?php echo (WPEditorSetting::get_value( 'wpeditor_logging' ) != 1 ) ? 'checked="checked"' : ''; ?>> <?php _e( 'No', 'wp-editor' ); ?> 99 </li> 100 <li class="indent"> 101 <p><a href="<?php echo esc_url(WPEditorLog::get_log_file_url()); ?>">View Log File</a></p> 99 102 </li> 100 103 <li class="indent description"> -
wp-editor/trunk/views/plugin-editor.php
r1416069 r3010222 1 1 <div id="save-result"></div> 2 2 <div class="wrap"> 3 <?php screen_icon(); ?>4 3 <h2><?php _e( 'Edit Plugins', 'wp-editor' ); ?></h2> 5 4 <?php if ( in_array( $data['file'], (array) get_option( 'active_plugins', array() ) ) ): ?> -
wp-editor/trunk/views/theme-editor.php
r1416069 r3010222 1 1 <div id="save-result"></div> 2 2 <div class="wrap"> 3 <?php screen_icon(); ?>4 3 <h2><?php _e( 'Edit Themes', 'wp-editor' ); ?></h2> 5 4 <?php -
wp-editor/trunk/wpeditor.php
r2456726 r3010222 4 4 Plugin URI: http://wpeditor.net 5 5 Description: This plugin modifies the default behavior of the WordPress plugin and theme editors. 6 Version: 1.2. 76 Version: 1.2.8 7 7 Requires at least: 3.9 8 8 Author: Benjamin Rojas
Note: See TracChangeset
for help on using the changeset viewer.