Plugin Directory

Changeset 385611


Ignore:
Timestamp:
05/16/2011 10:32:36 PM (15 years ago)
Author:
dardna
Message:

Fixed a security vulnerability (lack of _nonce on settings page).

Location:
wp-htaccess-control/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-htaccess-control/trunk/readme.txt

    r381005 r385611  
    77Requires at least: 2.7
    88Tested up to: 3.1.2
    9 Stable tag: 2.4
     9Stable tag: 2.5
    1010
    1111Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
     
    7373== Changelog ==
    7474
     75= 2.5 (16/05/2011) =
     76* *Fix:* fixed a security vulnerability (lack of _nonce on settings page) (thank you Julio from Boiteaweb.fr for ringing the alarm bell; thank you Otto for the kind support!).
     77
    7578= 2.4 (04/05/2011) =
    76 * *Feature:* added htaccess suggestion "Protect comments.php";
     79* *Feature:* added htaccess suggestion "Protect comments.php" (thank you specimen.tk);
    7780* Added "Latest donations";
    7881* Confirmed compatibility with WP 3.1.2.
  • wp-htaccess-control/trunk/wp-htaccess-control-ui.php

    r381004 r385611  
    44$q=explode('&',$_SERVER['QUERY_STRING']);
    55$purl='http'.((!empty($_SERVER['HTTPS'])) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$q[0];
    6 global $WPhtc;
     6global $WPhtc, $echo;
    77$WPhtc->wphtc_page_action();
    8 global $echo;
    98$WPhtc_data=get_option('WPhtc_data');
     9//$nonce= wp_create_nonce('WPhtc_settings');
    1010?>
    1111<div id="wphtc-page" class="wrap">
     
    415415                    </tr>
    416416                </table>
    417             </div> 
     417            </div>
     418            <?php wp_nonce_field('WPhtc_settings'); ?>
    418419            <input type="hidden" name="action" value="update" />
    419420            <div class="wphtc-menu">
    420                 <a class="button-secondary" href="<?php echo $purl?>&action=reset_rules"><?php _e('Reset all rules', 'wp-htaccess-control'); ?></a>
     421                <a class="button-secondary" href="<?php echo wp_nonce_url($purl."&action=reset_rules", 'WPhtc_reset_settings'); ?>"><?php _e('Reset all rules', 'wp-htaccess-control'); ?></a>
    421422                <input type="submit" class="button-primary" value="<?php _e('Save all changes', 'wp-htaccess-control'); ?>" />
    422423            </div>
  • wp-htaccess-control/trunk/wp-htaccess-control.php

    r381004 r385611  
    44Plugin URI: http://dardna.com/wp-htaccess-control
    55Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
    6 Version: 2.4
     6Version: 2.5
    77Author: António Andrade
    88Author URI: http://dardna.com
     
    433433                    # if reseting everything just delete the option array
    434434                    case 'reset_rules':
     435                        # nonce
     436                        if(!check_admin_referer( 'WPhtc_reset_settings')){
     437                            die("You have no permission to do this.");
     438                            }
    435439                        delete_option('WPhtc_data');
    436440                        $echo.=__('All rules reset.', 'wp-htaccess-control');
     
    442446                        if(!$WPhtc_data['donation_hidden_time']){
    443447                            $WPhtc_data['donation_hidden_time']=time();
     448                            }
     449                        # nonce
     450                        if(!check_admin_referer( 'WPhtc_settings')){
     451                            die("You have no permission to do this.");
    444452                            }
    445453                        # get Custom Htaccess
Note: See TracChangeset for help on using the changeset viewer.