Changeset 5404 for trunk/wp-admin/import/dotclear.php
- Timestamp:
- 05/07/2007 03:56:53 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/import/dotclear.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/dotclear.php
r5087 r5404 148 148 echo '<p>'.__('Your DotClear Configuration settings are as follows:').'</p>'; 149 149 echo '<form action="admin.php?import=dotclear&step=1" method="post">'; 150 wp_nonce_field('import-dotclear'); 150 151 $this->db_form(); 151 echo '<p class="submit"><input type="submit" name="submit" value="'. __('Import Categories').' »" /></p>';152 echo '<p class="submit"><input type="submit" name="submit" value="'.attribute_escape(__('Import Categories »')).'" /></p>'; 152 153 echo '</form></div>'; 153 154 } … … 559 560 560 561 echo '<form action="admin.php?import=dotclear&step=2" method="post">'; 561 printf('<input type="submit" name="submit" value="%s" />', __('Import Users')); 562 wp_nonce_field('import-dotclear'); 563 printf('<input type="submit" name="submit" value="%s" />', attribute_escape(__('Import Users'))); 562 564 echo '</form>'; 563 565 … … 571 573 572 574 echo '<form action="admin.php?import=dotclear&step=3" method="post">'; 573 printf('<input type="submit" name="submit" value="%s" />', __('Import Posts')); 575 wp_nonce_field('import-dotclear'); 576 printf('<input type="submit" name="submit" value="%s" />', attribute_escape(__('Import Posts'))); 574 577 echo '</form>'; 575 578 } … … 582 585 583 586 echo '<form action="admin.php?import=dotclear&step=4" method="post">'; 584 printf('<input type="submit" name="submit" value="%s" />', __('Import Comments')); 587 wp_nonce_field('import-dotclear'); 588 printf('<input type="submit" name="submit" value="%s" />', attribute_escape(__('Import Comments'))); 585 589 echo '</form>'; 586 590 } … … 593 597 594 598 echo '<form action="admin.php?import=dotclear&step=5" method="post">'; 595 printf('<input type="submit" name="submit" value="%s" />', __('Import Links')); 599 wp_nonce_field('import-dotclear'); 600 printf('<input type="submit" name="submit" value="%s" />', attribute_escape(__('Import Links'))); 596 601 echo '</form>'; 597 602 } … … 605 610 606 611 echo '<form action="admin.php?import=dotclear&step=6" method="post">'; 607 printf('<input type="submit" name="submit" value="%s" />', __('Finish')); 612 wp_nonce_field('import-dotclear'); 613 printf('<input type="submit" name="submit" value="%s" />', attribute_escape(__('Finish'))); 608 614 echo '</form>'; 609 615 } … … 668 674 if ( $step > 0 ) 669 675 { 676 check_admin_referer('import-dotclear'); 677 670 678 if($_POST['dbuser']) 671 679 { 672 680 if(get_option('dcuser')) 673 681 delete_option('dcuser'); 674 add_option('dcuser', $_POST['dbuser']);682 add_option('dcuser', sanitize_user($_POST['dbuser'], true)); 675 683 } 676 684 if($_POST['dbpass']) … … 678 686 if(get_option('dcpass')) 679 687 delete_option('dcpass'); 680 add_option('dcpass', $_POST['dbpass']);688 add_option('dcpass', sanitize_user($_POST['dbpass'], true)); 681 689 } 682 690 … … 685 693 if(get_option('dcname')) 686 694 delete_option('dcname'); 687 add_option('dcname', $_POST['dbname']);695 add_option('dcname', sanitize_user($_POST['dbname'], true)); 688 696 } 689 697 if($_POST['dbhost']) … … 691 699 if(get_option('dchost')) 692 700 delete_option('dchost'); 693 add_option('dchost', $_POST['dbhost']);701 add_option('dchost', sanitize_user($_POST['dbhost'], true)); 694 702 } 695 703 if($_POST['dccharset']) … … 697 705 if(get_option('dccharset')) 698 706 delete_option('dccharset'); 699 add_option('dccharset', $_POST['dccharset']);707 add_option('dccharset', sanitize_user($_POST['dccharset'], true)); 700 708 } 701 709 if($_POST['dbprefix']) … … 703 711 if(get_option('dcdbprefix')) 704 712 delete_option('dcdbprefix'); 705 add_option('dcdbprefix', $_POST['dbprefix']);713 add_option('dcdbprefix', sanitize_user($_POST['dbprefix'], true)); 706 714 } 707 715
Note: See TracChangeset
for help on using the changeset viewer.