Plugin Directory

Changeset 554955


Ignore:
Timestamp:
06/08/2012 06:23:07 PM (14 years ago)
Author:
fstrack
Message:
 
Location:
dm-albums/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dm-albums/trunk/readme.txt

    r539753 r554955  
    55Requires at least: 2.7
    66Tested up to: 3.3.1
    7 Stable tag: 3.1.5
     7Stable tag: 3.1.6
    88
    99DM Albums™ is an inline photo album/gallery plugin that displays high quality images and thumbnails perfectly sized to your blog.
     
    7878== Changelog ==
    7979
     80= 3.1.6 =
     81        <ul><li>Added patch to (hopefully) fix some user's issues with albums not appearing when uploading.</li>
     82        <li>Fixed versioning of javascript libs</li></ul>
     83       
    8084= 3.1.4 =
    8185        <ul><li>Added Flikr support: enter [dmalbum flikr="setid"/] where setid is the id of your set, i.e. [dmalbum flikr="72157629383149390"/]</li>
  • dm-albums/trunk/wp-dm-albums.php

    r539753 r554955  
    44Description: DM Albums is an inline photo album/gallery plugin that displays high quality images and thumbnails perfectly sized to your blog.
    55Plugin URI:  http://www.dutchmonkey.com/?file=products/dm-albums/dm-albums.html
    6 Version:     3.1.5
     6Version:     3.1.6
    77Author:      Frank D. Strack
    88Author URI:  http://www.dutchmonkey.com/
     
    2828/*
    2929Change log:
     30
     31    3.1.4
     32        * Added patch to (hopefully) fix some user's issues with albums not appearing when uploading.
     33        * Fixed versioning of javascript libs
    3034
    3135    3.1.4
  • dm-albums/trunk/wp-dm-upload.php

    r486244 r554955  
    1 <?php  /*************************************************************** 
     1<?php  /***************************************************************
    22 * Author: Frank D. Strack
    33 * Author Email: development@dutchmonkey.com
    44 * Author URI: http://www.dutchmokney.com
    5  * 
    6  * Thanks to safety of nDarkness.com for alerting us to a 
     5 *
     6 * Thanks to safety of nDarkness.com for alerting us to a
    77 * vulnerability and recommending a solution.
    88 ***************************************************************/
    9 
    10 require_once('../../../wp-config.php');
    11 require_once('php/includes.php');
    129
    1310if (isset($_POST["PHPSESSID"])) {
     
    1815
    1916session_start();
     17
     18require_once('../../../wp-config.php');
     19require_once('php/includes.php');
    2020
    2121if($_SESSION["DM_AUTH_UPLOAD"] != 1)
     
    5050
    5151if(!empty($album_name) && strlen($album_name) > 0)
    52 {   
     52{
    5353    if(!file_exists($dm_albums_uploaddir))
    5454    {
    5555        if(eregi("WIN", strtoupper(php_uname())))   $cache = "/cache";
    5656        else                                        $cache = "/.cache";
    57        
     57
    5858        dm_mkdir($dm_albums_uploaddir . $cache);    //mkdir($dm_albums_uploaddir . $cache, 0777, true);
    59        
     59
    6060        // If the file was not created, user does not have upload rights.
    6161        // Create folder in default upload dir location
     
    6767        }
    6868    }
    69    
     69
    7070    $extension_whitelist = array("jpg", "gif", "png", "jpeg");  // Allowed file extensions
    7171    $MAX_FILENAME_LENGTH = 260;
    72    
     72
    7373    $file_name = dm_sanitize($_FILES['Filedata']['name']);
    74    
     74
    7575    if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) {
    7676        HandleError("Invalid file name");
    7777        exit(0);
    7878    }
    79    
     79
    8080    $path_info = pathinfo($_FILES['Filedata']['name']);
    8181    $file_extension = $path_info["extension"];
    8282    $is_valid_extension = false;
    83    
     83
    8484    foreach ($extension_whitelist as $extension) {
    8585        if (strcasecmp($file_extension, $extension) == 0) {
     
    8888        }
    8989    }
    90    
     90
    9191    if (!$is_valid_extension) {
    9292        HandleError("Invalid file extension");
    9393        exit(0);
    9494    }
    95    
     95
    9696    @ move_uploaded_file($_FILES['Filedata']['tmp_name'], $dm_albums_uploaddir . "/" . $file_name);
    97    
     97
    9898    dm_add_photo_to_sortorder($dm_albums_uploaddir . "/", $file_name);
    9999}
     
    107107/* Handles the error output. This error message will be sent to the uploadSuccess event handler.  The event handler
    108108will have to check for any error messages and react as needed. */
    109 function HandleError($message) 
     109function HandleError($message)
    110110{
    111111    echo $message;
Note: See TracChangeset for help on using the changeset viewer.