Make WordPress Core

Changeset 5835


Ignore:
Timestamp:
08/01/2007 07:40:30 PM (18 years ago)
Author:
matt
Message:

Sanitize cat_id, fixes #4691

File:
1 edited

Legend:

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

    r5700 r5835  
    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.