Plugin Directory

Changeset 1175403


Ignore:
Timestamp:
06/05/2015 03:40:09 PM (10 years ago)
Author:
lisa_westlund
Message:

Version 1.05 carries out a security bug-fix.

Location:
portfolio-by-lisa-westlund/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • portfolio-by-lisa-westlund/trunk/inc/options-page-wrapper.php

    r1172722 r1175403  
    5454                                </fieldset>
    5555                                <br>
     56                                <?php wp_nonce_field( 'my_wplw_update_check', 'wplw-update-check' ); ?>
    5657                                <input class="button-primary" type="submit" name="wplw_settings_submit" value="Save" />
    5758                            </form>
  • portfolio-by-lisa-westlund/trunk/lisawestlund-instagram-portfolio.php

    r1172722 r1175403  
    5151       
    5252        /* Save form input data to $options array */   
     53               
    5354        if( isset( $_POST['wplw_form_submitted'] ) ){
    54             $hidden_field = esc_html($_POST['wplw_form_submitted']);
    55            
    56             if( $hidden_field == 'Y' ){
    57                 $wplw_instagram_access_token = esc_html($_POST['wplw_instagram_access_token']);
    58                 $wplw_instagram_userID = esc_html($_POST['wplw_instagram_userID']);
    59                 $wplw_hashtag = esc_html($_POST['wplw_hashtag']);
    60                                
    61                 if( isset($_POST['wplw_portfolio_date']) ){
    62                     $wplw_portfolio_date = 'checked';   
    63                 }
    64                
    65                 if( isset($_POST['wplw_portfolio_description']) ){
    66                     $wplw_portfolio_description = 'checked';   
    67                 }
    68                                
    69                 $options = array(
    70                     'wplw_instagram_access_token' => $wplw_instagram_access_token,
    71                     'wplw_instagram_userID' => $wplw_instagram_userID,
    72                     'wplw_hashtag' => $wplw_hashtag,
    73                     'wplw_portfolio_date' => $wplw_portfolio_date,
    74                     'wplw_portfolio_description' => $wplw_portfolio_description
    75                 );
    76                
    77                 update_option( 'wplw_instagram_portfolio', $options );
    78             }
    79         }
    80        
     55           
     56            if ( ! isset( $_POST['wplw-update-check'] ) || ! wp_verify_nonce( $_POST['wplw-update-check'], 'my_wplw_update_check' ) ) {
     57
     58                print 'Sorry, your nonce did not verify.';
     59                exit;
     60
     61            }
     62   
     63            else {
     64       
     65                $hidden_field = esc_html($_POST['wplw_form_submitted']);
     66               
     67                if( $hidden_field == 'Y' ){
     68                    $wplw_instagram_access_token = esc_html($_POST['wplw_instagram_access_token']);
     69                    $wplw_instagram_userID = esc_html($_POST['wplw_instagram_userID']);
     70                    $wplw_hashtag = esc_html($_POST['wplw_hashtag']);
     71                                   
     72                    if( isset($_POST['wplw_portfolio_date']) ){
     73                        $wplw_portfolio_date = 'checked';   
     74                    }
     75                   
     76                    if( isset($_POST['wplw_portfolio_description']) ){
     77                        $wplw_portfolio_description = 'checked';   
     78                    }
     79                                   
     80                    $options = array(
     81                        'wplw_instagram_access_token' => $wplw_instagram_access_token,
     82                        'wplw_instagram_userID' => $wplw_instagram_userID,
     83                        'wplw_hashtag' => $wplw_hashtag,
     84                        'wplw_portfolio_date' => $wplw_portfolio_date,
     85                        'wplw_portfolio_description' => $wplw_portfolio_description
     86                    );
     87                   
     88                    update_option( 'wplw_instagram_portfolio', $options );
     89                }
     90            }
     91        }
     92           
    8193        $options = get_option( 'wplw_instagram_portfolio' );
    8294        if( $options != '' ){
     95   
    8396            $wplw_instagram_access_token = $options['wplw_instagram_access_token'];
    8497            $wplw_instagram_userID = $options['wplw_instagram_userID'];
     
    87100            $wplw_portfolio_description = $options['wplw_portfolio_description'];
    88101        }
     102       
    89103        require( 'inc/options-page-wrapper.php' );
    90104    }
     
    212226    }
    213227         
    214  ?>
    215  
    216  
    217  
    218  
    219  
    220  
    221  
    222  
    223  
    224  
    225  
    226  
    227  
    228  
    229  
    230  
    231  
     228 ?>
  • portfolio-by-lisa-westlund/trunk/readme.txt

    r1172722 r1175403  
    55Requires at least:
    66Tested up to: 4.2.2
     7Stable tag: 1.05
    78License: GPLv2 or later
    89License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4445
    4546== Changelog ==
     47= 1.05 =
     48* This update carries a security bug-fix.
     49
    4650= 1.0 =
    4751* This is the first version of the plugin.
Note: See TracChangeset for help on using the changeset viewer.