From 89d81da1819c983c11ba43fbf3b0d758e3662e5f Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 25 Mar 2014 17:31:37 +0000 Subject: [PATCH] Ensure the $path is trailing-slashed in domain_exists(). props ejdanderson, ericmann. fixes #18209. git-svn-id: https://develop.svn.wordpress.org/trunk@27717 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index 2e26cbf9cb..8784623d05 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -1299,7 +1299,9 @@ Disable these notifications: %3$s'), $user->user_login, wp_unslash( $_SERVER['RE */ function domain_exists($domain, $path, $site_id = 1) { global $wpdb; + $path = trailingslashit( $path ); $result = $wpdb->get_var( $wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s AND site_id = %d", $domain, $path, $site_id) ); + /** * Filter whether a blogname is taken. *