Plugin Directory

Changeset 2034239


Ignore:
Timestamp:
02/19/2019 02:50:05 PM (7 years ago)
Author:
buntisoft
Message:

admin security issue fixed

Location:
insta-gallery/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • insta-gallery/trunk/app/views/edit.php

    r2032907 r2034239  
    6767                            <td>
    6868                            <?php if(empty($insgalleryIAC['access_token'])): ?>
    69                             <p class="ig-thm-color">
     69                                <p class="ig-thm-color">
    7070                                    <strong><?php _e('No Instagram account connected. please connect an account with the website to access Instagram media.','insta-gallery'); ?></strong></strong>
    7171                                </p>
    72                             <?php
    73    
    74 else :
    75         $profileInfo = igf_getUserProfileInfo();
    76         $username = empty($profileInfo['username']) ? 'nousername' : $profileInfo['username'];
    77         ?>
    78                             <input name="insta_user" type="text" placeholder="myusername" value="<?php echo $username; ?>" readonly /> <span class="description"></span>
    79                                 <p class="ig-generate-msgs"><?php _e('Please enter Instagram Username.','insta-gallery'); ?></p>
    80                                 <?php endif; ?>
     72                                <input name="insta_user" type="hidden" value="nousername" readonly />
     73                            <?php   
     74                            else :
     75                                $profileInfo = igf_getUserProfileInfo();
     76                                $username = empty($profileInfo['username']) ? 'nousername' : $profileInfo['username'];
     77                                ?>
     78                                <input name="insta_user" type="text" placeholder="myusername" value="<?php echo $username; ?>" readonly /> <span class="description"></span>
     79                                    <p class="ig-generate-msgs"><?php _e('Please enter Instagram Username.','insta-gallery'); ?></p>
     80                            <?php endif; ?>
    8181                                </td>
    8282                        </tr>
     
    298298    </div>
    299299    <input type="hidden" name="ig-form-update" value="true" />
     300    <input type="hidden" name="ig_nonce" value="<?php echo wp_create_nonce( 'igfreq_nonce_key' ); ?>" />
    300301    <?php if(!empty($InstaGalleryItem['ig_item_id'])) {?>
    301302        <input type="hidden" name="igitem_id" value="<?php echo $InstaGalleryItem['ig_item_id']; ?>" />
  • insta-gallery/trunk/app/wp-panel.php

    r2032907 r2034239  
    1616$ig_page_msgs = array();
    1717// add/update gallery item
    18 if (isset($_POST['ig-form-update'])) {
     18if (isset($_POST['ig-form-update']) && isset($_POST['ig_nonce']) && wp_verify_nonce($_POST['ig_nonce'], 'igfreq_nonce_key')) {
    1919    // filtering data
    2020    $POSTDATA = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
  • insta-gallery/trunk/insta-gallery.php

    r2032907 r2034239  
    1010 * Text Domain: insta-gallery
    1111 * Domain Path: /languages/
    12  * Version: 2.1.1
     12 * Version: 2.1.2
    1313 */
    1414
     
    2525
    2626// global constants
    27 define('INSGALLERY_VER', '2.1.1');
     27define('INSGALLERY_VER', '2.1.2');
    2828define('INSGALLERY_PRODUCTION', true);
    2929
     
    196196    function admin_init()
    197197    {
    198         if (isset($_REQUEST['igigresponse'])) {
     198        if (current_user_can('administrator') && isset($_REQUEST['igigresponse'])) {
    199199            if (! empty($_REQUEST['code'])) {
    200200                $code = filter_var($_REQUEST['code'], FILTER_SANITIZE_STRING);
     
    241241    function loadPanel()
    242242    {
     243        if(!current_user_can('administrator')){
     244            return;
     245        }
    243246        require_once (INSGALLERY_PATH . 'app/wp-panel.php');
    244247    }
  • insta-gallery/trunk/readme.txt

    r2032907 r2034239  
    55Requires PHP: 5.3
    66Tested up to: 5.0
    7 Stable tag: 2.1.1
     7Stable tag: 2.1.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7575
    7676== Changelog ==
     77= 2.1.2 =
     78* security fixes
     79
     80
    7781= 2.1.1 =
    7882* major update with lots-of changes
     
    222226
    223227== Upgrade Notice ==
     228= 2.1.2 =
     229added security fixes
     230
    224231= 2.1.1 =
    225232major update, please backup plugin files before update
Note: See TracChangeset for help on using the changeset viewer.