WordPress.org

Make WordPress Core

Changeset 5841


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

Sanitize cat_id, fixes #4691 for 2.0.x

File:
1 edited

Legend:

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

    r4844 r5841  
    7575     <h2><?php _e('Importing...') ?></h2> 
    7676<?php 
    77                 $cat_id = $_POST['cat_id']; 
    78                 if (($cat_id == '') || ($cat_id == 0)) { 
    79                     $cat_id  = 1; 
    80                 } 
     77                $cat_id = abs( (int) $_POST['cat_id'] ); 
     78                if ( $cat_id < 1 ) 
     79                    $cat_id  = 1; 
    8180 
    8281                $opml_url = $_POST['opml_url']; 
Note: See TracChangeset for help on using the changeset viewer.