Plugin Directory

Changeset 3010222


Ignore:
Timestamp:
12/14/2023 06:57:43 PM (2 years ago)
Author:
benjaminprojas
Message:

1.2.8

Location:
wp-editor/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wp-editor/trunk/classes/WPEditorLog.php

    r1416069 r3010222  
    77      $date = date( 'm/d/Y g:i:s a', self::local_ts() );
    88      $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';
    1011      if ( file_exists( $filename ) && is_writable( $filename ) ) {
    1112        file_put_contents( $filename, $header . $data, FILE_APPEND );
     
    4647 
    4748  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';
    4951    return $log_file_path;
    5052  }
     
    5860    return $exists;
    5961  }
     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  }
    6076 
    6177}
  • wp-editor/trunk/readme.txt

    r2790812 r3010222  
    44Tags: 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
    55Requires at least: 3.9
    6 Tested up to: 4.6.1
    7 Stable tag: 1.2.7
     6Tested up to: 6.4.2
     7Stable tag: 1.2.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7070== Changelog ==
    7171
     72= 1.2.8 =
     73* Randomize log file name
     74
    7275= 1.2.7 =
    7376* Security release: fixes SQLi vulnerabilities.
  • wp-editor/trunk/uninstall.php

    r1416069 r3010222  
    99
    1010global $wpdb;
     11delete_option('wpe_log_file_name');
    1112$prefix = WPEditor::get_table_prefix();
    1213$sqlFile = WPEDITOR_PATH . 'sql/uninstall.sql';
  • wp-editor/trunk/views/OLDsettings.php

    r1416069 r3010222  
    9797                                        <input type="radio" name="wpeditor_logging" value="1" <?php echo (WPEditorSetting::get_value( 'wpeditor_logging' ) == 1 ) ? 'checked="checked"' : ''; ?>> <?php _e( 'Yes', 'wp-editor' ); ?>
    9898                                        <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>
    99102                                    </li>
    100103                                    <li class="indent description">
  • wp-editor/trunk/views/plugin-editor.php

    r1416069 r3010222  
    11<div id="save-result"></div>
    22<div class="wrap">
    3     <?php screen_icon(); ?>
    43    <h2><?php _e( 'Edit Plugins', 'wp-editor' ); ?></h2>
    54    <?php if ( in_array( $data['file'], (array) get_option( 'active_plugins', array() ) ) ): ?>
  • wp-editor/trunk/views/theme-editor.php

    r1416069 r3010222  
    11<div id="save-result"></div>
    22<div class="wrap">
    3     <?php screen_icon(); ?>
    43    <h2><?php _e( 'Edit Themes', 'wp-editor' ); ?></h2>
    54    <?php
  • wp-editor/trunk/wpeditor.php

    r2456726 r3010222  
    44Plugin URI: http://wpeditor.net
    55Description: This plugin modifies the default behavior of the WordPress plugin and theme editors.
    6 Version: 1.2.7
     6Version: 1.2.8
    77Requires at least: 3.9
    88Author: Benjamin Rojas
Note: See TracChangeset for help on using the changeset viewer.