Plugin Directory

Changeset 988003


Ignore:
Timestamp:
09/12/2014 07:21:49 AM (12 years ago)
Author:
lynton_reed
Message:

Modification to generated .htaccess rules.

Location:
work-the-flow-file-upload/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • work-the-flow-file-upload/trunk/README.txt

    r984253 r988003  
    55Requires at least: 3.5.1
    66Tested up to: 4.0
    7 Stable tag: 2.4.0
     7Stable tag: 2.4.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    325325
    326326== Changelog ==
     327= 2.4.1 =
     328* Fix for generated .htaccess file preventing image display on some servers.
     329
    327330= 2.4.0 =
    328331* Security enhancement, deny_file_type added to upload options.
     
    464467
    465468== Upgrade Notice ==
     469= 2.4.1 =
     470* Fix for generated .htaccess file preventing image display on some servers.
     471
    466472= 2.4.0 =
    467473* Security enhancement, deny_file_type added to upload options.
  • work-the-flow-file-upload/trunk/includes/wtf-fu-common-utils.php

    r984253 r988003  
    113113    SetHandler default-handler
    114114    Options -ExecCGI -Indexes
    115     php_flag engine off
    116115    RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo .asp .aspx
    117116</Files>
     
    122121        return "To better secure file uploads the file : $filename has been created.";
    123122    } else {
    124         return "$filename not required to be created as it already exists.";
     123       
     124        $pattern = "/# BEGIN wtf-fu modifications.*# END wtf-fu modifications/s";
     125        // inspect the .htaccess file and replace the wtf-fu section if it is already there.
     126       
     127        $file_contents = file_get_contents($filename);
     128       
     129        log_me(array(".htacess" => $file_contents, "pattern" => $pattern));
     130       
     131        if ( preg_match($pattern, $file_contents) ) {
     132            $file_contents = preg_replace($pattern, $text , $file_contents);
     133            file_put_contents($filename, $file_contents);
     134            return "$filename wtf-fu section has been updated.";       
     135        }
     136        return "$filename exists and has not been altered for wtf-fu modifications.";
    125137    }
    126138}
  • work-the-flow-file-upload/trunk/public/class-wtf-fu.php

    r984253 r988003  
    4444     * @var     string
    4545     */
    46     const VERSION = '2.4.0';
     46    const VERSION = '2.4.1';
    4747
    4848    /**
  • work-the-flow-file-upload/trunk/work-the-flow-file-upload.php

    r984253 r988003  
    55 * Plugin URI:        http://wtf-fu.com
    66 * Description:       Front end Html5 File Upload and configurable Workflow steps. Multiple file drag and drop, gallery image display, file reordering and archiving.
    7  * Version:           2.4.0
     7 * Version:           2.4.1
    88 * Author:            Lynton Reed
    99 * Author URI:        http://wtf-fu.com
Note: See TracChangeset for help on using the changeset viewer.