]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/upgrade.php
Wordpress 2.9
[autoinstalls/wordpress.git] / wp-admin / upgrade.php
index 6f19e70cb4a1968db9571d387e23d182f9b138ca..4c27b60578e3b76e16d541ae585d0d7a0c7b4a88 100644 (file)
@@ -69,12 +69,10 @@ switch ( $step ) :
        case 1:
                wp_upgrade();
 
        case 1:
                wp_upgrade();
 
-               if ( empty( $_GET['backto'] ) )
-                       $backto = __get_option( 'home' ) . '/';
-               else {
-                       $backto = stripslashes( urldecode( $_GET['backto'] ) );
+                       $backto = empty($_GET['backto']) ? '' : $_GET['backto'] ;
+                       $backto = stripslashes( urldecode( $backto ) );
                        $backto = esc_url_raw( $backto  );
                        $backto = esc_url_raw( $backto  );
-               }
+                       $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/');
 ?>
 <h2><?php _e( 'Upgrade Complete' ); ?></h2>
        <p><?php _e( 'Your WordPress database has been successfully upgraded!' ); ?></p>
 ?>
 <h2><?php _e( 'Upgrade Complete' ); ?></h2>
        <p><?php _e( 'Your WordPress database has been successfully upgraded!' ); ?></p>