[wp-trac] [WordPress Trac] #12736: my-sites.php uses site url instead of home url in visit links
WordPress Trac
wp-trac at lists.automattic.com
Sun Mar 28 16:32:34 UTC 2010
#12736: my-sites.php uses site url instead of home url in visit links
--------------------------+-------------------------------------------------
Reporter: andreasnrb | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.0
Component: Multisite | Version: 3.0
Severity: critical | Keywords: my-sites.php
--------------------------+-------------------------------------------------
Changes (by andreasnrb):
* severity: normal => critical
Comment:
This relates to tickets: #12142, #12735 and probably others.[[BR]]
This solves a bunch of support request related to login problems and
cookies with MU.
Current fix for some of these support requests is to define new cookie
paths etc but the problem is in the code.
== All places that uses wrong site and home url ==
* wp-admin
* wp-includes
* export.php
{{{
148: if ( isset($current_site->domain) ) {
149: return 'http://'.$current_site->domain.$current_site->path;
}}}
* ms.php
{{{
282: $content = str_replace('###SITEURL###', 'http://' .
$current_site->domain . $current_site->path, $content);
333: $content = str_replace('###SITEURL###', 'http://' .
$current_site->domain . $current_site->path, $content);
}}}
* upgrade.php
{{{
201: $first_post = str_replace( "SITE_URL", esc_url("http://" .
$current_site->domain . $current_site->path), $first_post );
232: $first_comment_url = get_site_option( 'first_comment_url', 'http://'
. $current_site->domain . $current_site->path );
}}}
* ms-edit.php
{{{
73: $dashboard_blog = untrailingslashit( sanitize_user( str_replace( '.',
'', str_replace( $current_site->domain . $current_site->path, '', $_POST[
'dashboard_blog' ] ) ) ) );
}}}
* ms-options.php
{{{
62: $blogname = untrailingslashit( sanitize_user( str_replace( '.', '',
str_replace( $current_site->domain . $current_site->path, '',
$details->domain . $details->path ) ) ) );
87: <?php if ( get_site_option( 'admin_notice_feed' ) != 'http://' .
$current_site->domain . $current_site->path . 'feed/' )
88: echo __( "A good one to use would be the feed from your main site: " )
. 'http://' . $current_site->domain . $current_site->path . 'feed/';
?></td>
}}}
* ms-sites.php 737,739 should use home and site url instead
* ms-users.php displays site url, should be home url.
{{{
233: echo '<a href="ms-sites.php?action=editblog&id=' .
$val->userblog_id . '">' . str_replace( '.' . $current_site->domain, '',
$val->domain . $path ) . '</a>';
}}}
* wp-includes
* ms-blogs.php See #12735
* ms-default-constants.php Numerous places
{{{
36: ms_cookie_constants uses wrong values for paths. Will fix this #12142
and that you arent logged in on frontend when wp resides in subfolder.
98 wp_mu_current_site should set home url and site url.
}}}
* ms-functions.php
{{{
677: $activate_url = "http://" . $current_site->domain .
$current_site->path . "wp-activate.php?key=$key";
852: $options_site_url =
esc_url("http://{$current_site->domain}{$current_site->path}wp-admin/ms-
options.php");
883: $options_site_url =
esc_url("http://{$current_site->domain}{$current_site->path}wp-admin/ms-
options.php");
1 281: $destination = $current_site->domain . $current_site->path;
}}}
* ms-load.php
{{{
function wpmu_current_site()//messes up cookie domains due to the home,
site url related faults.
}}}
* ms-settings.php
{{{
83: $destination = "http://" . $current_site->domain .
$current_site->path;
85: $destination = 'http://' . $current_site->domain . $current_site->path
. 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '',
$domain );
94: header( 'Location: http://' . $current_site->domain .
$current_site->path );
}}}
* wp-activate.php
{{{
46: <form name="activateform" id="activateform" method="post"
action="<?php echo 'http://' . $current_site->domain . $current_site->path
?>wp-activate.php">
67: ... ttp://' . $current_site->domain . $current_site-> ... ttp://' .
$current_site->domain . $current_site->path . 'wp-
login.php?action=lostpassword');
69: ... ->domain, $signup->user_login, $signup->user_email, 'http://' .
$current_site->domain . $current_site->path . 'wp-
login.php?action=lostpassword');
89: <?php if ( $url != 'http://' . $current_site->domain .
$current_site->path ) : ?>
92: ... e</a>.' ), 'http://' . $current_site->domain .
$current_site->path . 'wp-login.php', 'http://' . $current_site->domain .
$current_site->path ); ?></p>
}}}
* wp-login.php
{{{
88: ... ttp://' . $current_site->domain . $current_site->path ); ?>"
title="<?php echo apply_filters('login_headertitle',
$current_site->site_name ); ?>"><span ...
190: $message .= 'http://' . trailingslashit( $current_site->domain .
$current_site->path ) ...
196: $message .= 'http://' . trailingslashit( $current_site->domain .
$current_site->path ) . "wp-login.php?action=rp&key=$key&login=" ...
}}}
* wp-signup.php
{{{
12: wp_redirect( "http://{$current_site->domain}{$current_site->path}" );
31: wp_redirect( "http://" . $current_site->domain . $current_site->path .
"wp-signup.php" );
76: echo '<span class="prefix_address">' . $current_site->domain .
$current_site->path . '</span><input name="blogname" type="text"
id="blogname" value="'. esc_attr($blogname) .'" maxlength="50" /><br />';
78: echo '<input name="blogname" type="text" id="blogname"
value="'.esc_attr($blogname).'" maxlength="50" /><span
class="suffix_address">.' . $current_site->domain . $current_site->path .
'</span><br />';
83: print $current_site->domain . $current_site->path . __( 'sitename' );
85: print __( 'domain.' ) . $current_site->domain . $current_site->path;
433: $newblog = 'http://' . $current_site->domain . $current_site->path .
$newblogname . '/';
435: $newblog = 'http://' . $newblogname . '.' . $current_site->domain .
$current_site->path;
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12736#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list