WordPress.org

Plugin Directory

Changeset 572188


Ignore:
Timestamp:
07/14/12 12:26:53 (3 years ago)
Author:
lucidcrew
Message:
  • fixing harmless "exploits"
Location:
forum-server/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • forum-server/trunk/fs-admin/fs-admin.php

    r532918 r572188  
    5353                $count = count($delete_usrgrp); 
    5454                for($i = 0; $i < $count; $i++){ 
    55                     $wpdb->query("DELETE FROM ".$table_prefix."forum_usergroups WHERE id = {$delete_usrgrp[$i]}"); 
    56                     $wpdb->query("DELETE FROM ".$table_prefix."forum_usergroup2user WHERE `group` = {$delete_usrgrp[$i]}"); 
     55                    $wpdb->query("DELETE FROM ".$table_prefix."forum_usergroups WHERE id = ".(int)$delete_usrgrp[$i]); 
     56                    $wpdb->query("DELETE FROM ".$table_prefix."forum_usergroup2user WHERE `group` = ".(int)$delete_usrgrp[$i]); 
    5757 
    5858                } 
     
    146146                    echo "<div id='message' class='updated fade'><p>$msg</p></div>"; 
    147147            if(isset($_GET['do']) && $_GET['do'] == "removemember"){ 
    148                 $count = $wpdb->query("DELETE FROM ".$table_prefix."forum_usergroup2user WHERE user_id = {$_GET['memberid']} AND `group` = {$_GET['groupid']}"); 
     148                $count = $wpdb->query("DELETE FROM ".$table_prefix."forum_usergroup2user WHERE user_id = {$_GET['memberid']} AND `group` = ".(int)$_GET['groupid']); 
    149149                echo "<div id='message' class='updated fade'><p>" . __("Member successfully removed.", "vasthtml") . "</p></div>"; 
    150150            } 
     
    863863            global $wpdb, $table_prefix; 
    864864            $new_groups = maybe_serialize($new_groups); 
    865             $wpdb->query("UPDATE ".$table_prefix."forum_groups SET usergroups = '$new_groups' WHERE id = $group_id"); 
    866         } 
    867  
     865            $wpdb->query("UPDATE ".$table_prefix."forum_groups SET usergroups = '$new_groups' WHERE id = ".(int)$group_id); 
     866        } 
    868867        function get_usersgroups_with_access_to_group($groupid){ 
    869868            global $wpdb, $table_prefix; 
    870             $string = $wpdb->get_var("select usergroups from ".$table_prefix."forum_groups where id = $groupid"); 
     869            $string = $wpdb->get_var("select usergroups from ".$table_prefix."forum_groups where id = ".(int)$groupid); 
    871870            return  maybe_unserialize( $string ); 
    872  
    873         } 
    874  
     871        } 
    875872        function edit_moderator(){ 
    876873            if(isset($_POST['update_mod'])){ 
  • forum-server/trunk/fs-admin/wpf-add-forum.php

    r136715 r572188  
    11<?php  
    22/*************** wpf-add-forum.php *********************/ 
    3     echo "<h2>".__("Add forum to", "vasthtml")." \"".stripslashes($vasthtml->get_groupname($_GET['groupid']))."\"</h2>"; 
     3    echo "<h2>".__("Add forum to", "vasthtml")." \"".stripslashes($vasthtml->get_groupname((int)$_GET['groupid']))."\"</h2>"; 
    44 
    55    echo "<form name='add_forum_form' id='add_forum_form' method='post' action='".ADMIN_BASE_URL."structure'>"; 
     
    2828                <td><input type='submit' value='".__("Save forum", "vasthtml")."' name='add_forum_submit' /></td> 
    2929            </tr> 
    30             <input type='hidden' name='add_forum_group_id' value='{$_GET['groupid']}' />"; 
     30            <input type='hidden' name='add_forum_group_id' value='".(int)$_GET['groupid']."' />"; 
    3131     
    3232    echo "</form></table>"; 
  • forum-server/trunk/fs-admin/wpf-edit-forum-group.php

    r532918 r572188  
    5656            <tr> 
    5757                <th>".__("Description", "vasthtml")."</th> 
    58                 <td><textarea name='edit_group_description' ".ADMIN_ROW_COL.">".stripslashes($vasthtml->get_group_description($_GET['groupid']))."</textarea></td> 
     58                <td><textarea name='edit_group_description' ".ADMIN_ROW_COL.">".stripslashes($vasthtml->get_group_description((int)$_GET['groupid']))."</textarea></td> 
    5959            </tr> 
    6060            <tr> 
  • forum-server/trunk/readme.txt

    r532918 r572188  
    77Requires at least: 2.6 
    88Tested up to: 3.3.1 
    9 Stable tag: 1.7.3 
     9Stable tag: 1.7.4 
    1010 
    1111This Wordpress plugin is a complete forum system for your wordpress blog. 
     
    8585 
    8686== Changelog == 
     87 
     88= 1.7.5 = 
     89* fixing harmless "exploits" 
    8790 
    8891= 1.7.4 = 
  • forum-server/trunk/wpf-main.php

    r532918 r572188  
    55    Author URI: http://forumpress.org/ 
    66    Plugin URI: http://forumpress.org/ 
    7     Version: 1.7.4 
     7    Version: 1.7.5 
    88*/ 
    99 
Note: See TracChangeset for help on using the changeset viewer.