Plugin Directory

Changeset 3313475


Ignore:
Timestamp:
06/17/2025 07:02:07 PM (9 months ago)
Author:
dogrow
Message:

Security updated

Location:
falling-cherry-flower/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • falling-cherry-flower/trunk/readme.txt

    r3313468 r3313475  
    3636== ChangeLog ==
    3737
     38= Version 1.1 =
     39
     40* Security updated
     41
    3842= Version 1.0 =
    3943
  • falling-cherry-flower/trunk/ytmr_falling_flower.php

    r1726492 r3313475  
    44Plugin URI: https://php.dogrow.net/wordpressplugin/falling-cherry-flower/
    55Description: Falling cherry flower effect on the screen
    6 Version: 1.0
     6Version: 1.1
    77Author: DOGROW.NET
    88Author https://php.dogrow.net/
     
    5151    // type
    5252    if(isset($this->m_shortcode_arg['type'])){
    53       if(file_exists($path_me.'/img/'.$this->m_shortcode_arg['type'])){
    54         $ary_prm['type'] = $this->m_shortcode_arg['type'];
     53      $type = basename( sanitize_text_field( $this->m_shortcode_arg['type'] ) );
     54      if(preg_match( '/^[a-zA-Z0-9_\-]+$/', $type)){
     55        if(file_exists($path_me.'/img/'.$type)){
     56          $ary_prm['type'] = $type;
     57        }
    5558      }
    5659    }
     
    5861    // speed
    5962    if(isset($this->m_shortcode_arg['speed'])){
    60       $speed = $this->m_shortcode_arg['speed'];
     63      $speed = intval( $this->m_shortcode_arg['speed'] );
    6164      if((0 <= $speed) && ($speed <= 5)){
    6265        $ary_prm['speed'] = $speed;
     
    6467    }
    6568    //------------------------------------------------------------------
    66     $img_dir = plugins_url('img/'.$ary_prm['type'], __FILE__).'/';
     69    $img_dir = plugins_url( 'img/'.$ary_prm['type'].'/', __FILE__ );
     70    $img_dir = esc_url_raw( trailingslashit( $img_dir ) );    // 出力前にエスケープ
    6771    //------------------------------------------------------------------
    6872echo <<< EOM
Note: See TracChangeset for help on using the changeset viewer.