Sanitize cat_id, fixes #4691 for 2.0.x

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@5841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-08-02 15:23:12 +00:00
parent 9b7d5eda66
commit 7ed5ba96ac
1 changed files with 3 additions and 4 deletions

View File

@ -74,10 +74,9 @@ foreach ($categories as $category) {
<h2><?php _e('Importing...') ?></h2>
<?php
$cat_id = $_POST['cat_id'];
if (($cat_id == '') || ($cat_id == 0)) {
$cat_id = 1;
}
$cat_id = abs( (int) $_POST['cat_id'] );
if ( $cat_id < 1 )
$cat_id = 1;
$opml_url = $_POST['opml_url'];
if (isset($opml_url) && $opml_url != '' && $opml_url != 'http://') {