Plugin Directory

Changeset 3373333


Ignore:
Timestamp:
10/06/2025 03:19:34 AM (6 months ago)
Author:
nigelmoore1
Message:

push version 1.3.4

Location:
the-tech-tribe/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • the-tech-tribe/trunk/README.txt

    r3233614 r3373333  
    44Tags: techtribe, content, syndication
    55Requires at least: 5.0
    6 Tested up to: 6.7
    7 Stable tag: 1.3.3
     6Tested up to: 6.8.3
     7Stable tag: 1.3.4
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    5959
    6060== Changelog ==
     61= 1.3.4 October 1, 2025 =
     62* Maintenance Security Update
     63* Support for WordPress 6.8.3
    6164
    6265= 1.3.3 January 31, 2025 =
  • the-tech-tribe/trunk/admin/partials/dashboard/api.php

    r2627939 r3373333  
    22    <div class="mb-3">
    33        <label class="form-label">API Key</label>
    4         <input type="password" class="form-control" name="ttt_api_key" value="<?php echo $apiKey;?>">
     4        <input type="password" class="form-control" name="ttt_api_key" value="<?php echo esc_attr($apiKey);?>">
    55        <div id="apiHelp" class="ttt-form-text">
    66            <div class="container-ttt-content">
  • the-tech-tribe/trunk/admin/partials/dashboard/main.php

    r2977885 r3373333  
    44        <div class="alert alert-warning" role="alert">
    55            WARNING: The log file for this plugin contains your web servers IP Address. </br>
    6             By default, Wordpress stores all Plugin Log Files in the /uploads/ folder which could be publicly accessible depending on your webserver configuration. </br>
     6            This plugin attempts to store log files in a secure 'logs' directory outside the web root. If this directory is not available or writable, it will fall back to the /uploads/ folder, which could be publicly accessible depending on your webserver configuration. </br>
    77            If you don't want this log file to be publicly accessible, please check your webservers configuration and update your permissions if necessary.</br>
    88        </div>
  • the-tech-tribe/trunk/admin/partials/dashboard/settings.php

    r2627939 r3373333  
    2828        <select class="form-select" aria-label="Default select author" name="ttt_post_author">
    2929            <?php foreach($users as $user) : ?>
    30                 <option value="<?php echo $user->ID;?>" <?php echo ($defaultAuthor == $user->ID) ? 'selected':'';?>>
     30                <option value="<?php echo esc_attr($user->ID);?>" <?php echo ($defaultAuthor == $user->ID) ? 'selected':'';?>>
    3131                    <?php esc_html_e($user->display_name);?>
    3232                </option>
  • the-tech-tribe/trunk/app/AjaxImportPost.php

    r3019604 r3373333  
    6161
    6262        if(isset($ret->data['code']) && ! $ret->data['success']) {
    63             $returnMsg = isset($ret->data['msg']['errors']['invalid'][0]) ? $ret->data['msg']['errors']['invalid'][0] : $ret->data['msg'];
     63            $rawMsg = isset($ret->data['msg']['errors']['invalid'][0]) ? $ret->data['msg']['errors']['invalid'][0] : $ret->data['msg'];
     64            $returnMsg = esc_html($rawMsg);
    6465            $returnCode = (!$ret->data['success']) ? 'error':'';
    6566        }
     
    7677            foreach($ret->data['summary']['post'] as $post) {
    7778                $msgContent .= '<li>';
    78                 $msgContent .= $post['title'];
     79                $msgContent .= esc_html($post['title']);
    7980                $msgContent .= '</li>';
    8081            }
  • the-tech-tribe/trunk/helpers/utilities.php

    r2779134 r3373333  
    33    exit; // Exit if accessed directly
    44}
     5
     6define('TTT_LOG_FILE_NAME', 'The-Tribal-Plugin.log');
    57
    68if(!function_exists('ttt_str_contains')){
     
    208210        $log = json_encode($log);
    209211    }
    210     $upload_dir = wp_upload_dir();
    211 
    212     $file = $upload_dir['basedir'] . '/The-Tribal-Plugin.log';
    213 
    214     if(is_writable($upload_dir['basedir'])){
    215         $file = fopen($file,"a");
     212    // Try secure location first
     213    $log_dir = ABSPATH . '../logs';   
     214    if (!is_dir($log_dir)) {
     215        mkdir($log_dir, 0755, true);
     216    }
     217    if (!is_writable($log_dir)) {
     218        // Fallback to uploads if secure location is not writable
     219        $upload_dir = wp_upload_dir();
     220        $log_dir = $upload_dir['basedir'];
     221    }
     222    $file = $log_dir . '/' . TTT_LOG_FILE_NAME;
     223
     224    if(is_writable($log_dir)){
     225        $file_handle = fopen($file,"a");
    216226        $dateTime = date("Y-m-d H:i:s");
    217227        $newDateTime = new DateTime($dateTime);
    218228        $newDateTime->setTimezone(new DateTimeZone("UTC"));
    219229        $dateTimeUTC = $newDateTime->format("Y-m-d H:i:s");
    220         fwrite($file, "\n" ."(UTC) " . $dateTimeUTC . " | Local Time - " . wp_date('Y-m-d H:i:s') . ' :: ' . $log);
    221         fclose($file);
     230        fwrite($file_handle, "\n" ."(UTC) " . $dateTimeUTC . " | Local Time - " . wp_date('Y-m-d H:i:s') . ' :: ' . $log);
     231        fclose($file_handle);
     232    } else {
     233        // Failsafe: Log to PHP error log if no directory is writable
     234        error_log('The-Tribal-Plugin: ' . $log);
    222235    }
    223236}
    224237
    225238function tttCustomLogsDelete() {
     239    // Check secure location first
     240    $secure_dir = ABSPATH . '../logs';
     241    $secure_file = $secure_dir . '/' . TTT_LOG_FILE_NAME;
     242    if(file_exists($secure_file)){
     243        unlink($secure_file);
     244    }
     245    // Also check fallback location
    226246    $upload_dir = wp_upload_dir();
    227 
    228     $file = $upload_dir['basedir'] . '/The-Tribal-Plugin.log';
    229 
    230     if(file_exists($file)){
    231         unlink($file);
     247    $upload_file = $upload_dir['basedir'] . '/' . TTT_LOG_FILE_NAME;
     248    if(file_exists($upload_file)){
     249        unlink($upload_file);
    232250    }
    233251}
  • the-tech-tribe/trunk/the-tribal-plugin.php

    r3233614 r3373333  
    1717 * Plugin URI:        thetechtribe.com
    1818 * Description:       This plugin is for members of The Tech Tribe to manage features such as Automated Blog Posting etc.
    19  * Version:           1.3.3
     19 * Version:           1.3.4
    2020 * Author:            The Tech Tribe
    2121 * Author URI:        https://thetechtribe.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'THE_TRIBAL_PLUGIN_VERSION', '1.3.3' );
     38define( 'THE_TRIBAL_PLUGIN_VERSION', '1.3.4' );
    3939
    4040//date_default_timezone_set(wp_timezone_string());
Note: See TracChangeset for help on using the changeset viewer.