mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Multisite: Don't allow sites to be created with the following reserved slugs: wp-admin
, wp-content
, wp-includes
Props austinginder. Fixes #33615. Built from https://develop.svn.wordpress.org/trunk@33952 git-svn-id: http://core.svn.wordpress.org/trunk@33921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0c97b3625e
commit
3d8199c4eb
@ -47,7 +47,7 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
|
||||
// If not a subdomain install, make sure the domain isn't a reserved word
|
||||
if ( ! is_subdomain_install() ) {
|
||||
/** This filter is documented in wp-includes/ms-functions.php */
|
||||
$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) );
|
||||
$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes' ) );
|
||||
if ( in_array( $domain, $subdirectory_reserved_names ) )
|
||||
wp_die( sprintf( __('The following words are reserved for use by WordPress functions and cannot be used as blog names: <code>%s</code>' ), implode( '</code>, <code>', $subdirectory_reserved_names ) ) );
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
|
||||
*
|
||||
* @param array $subdirectory_reserved_names Array of reserved names.
|
||||
*/
|
||||
apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) )
|
||||
apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin', 'wp-content', 'wp-includes' ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-33951';
|
||||
$wp_version = '4.4-alpha-33952';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user