WordPress.org

Make WordPress Core

Changeset 5840


Ignore:
Timestamp:
08/02/07 15:10:25 (7 years ago)
Author:
markjaquith
Message:

Sanitize cat_id, fixes #4692 for 2.2.x, thanks g30rg3x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-admin/link-import.php

    r5438 r5840  
    7474<h2><?php _e('Importing...') ?></h2> 
    7575<?php 
    76         $cat_id = $_POST['cat_id']; 
    77         if ( $cat_id == '' || $cat_id == 0 ) 
     76        $cat_id = abs( (int) $_POST['cat_id'] ); 
     77        if ( $cat_id < 1 ) 
    7878            $cat_id  = 1; 
    7979 
Note: See TracChangeset for help on using the changeset viewer.