From 7226d2f2b3a06e690edb46943d957b4437448300 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 23 Nov 2005 22:38:25 +0000 Subject: [PATCH] Strip home path from path info. This prevents a path info value of '/wp/index.php' from being considered as a permalink request. fixes #1938 git-svn-id: https://develop.svn.wordpress.org/trunk@3206 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index ae75aab410..5efa33cfee 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -1443,13 +1443,14 @@ class WP { $req_uri = str_replace($pathinfo, '', $req_uri); $req_uri = str_replace($home_path, '', $req_uri); $req_uri = trim($req_uri, '/'); + $pathinfo = str_replace($home_path, '', $pathinfo); $pathinfo = trim($pathinfo, '/'); $self = str_replace($home_path, '', $self); $self = trim($self, '/'); // The requested permalink is in $pathinfo for path info requests and // $req_uri for other requests. - if (! empty($pathinfo) && ($wp_rewrite->index != $pathinfo)) { + if ( ! empty($pathinfo) && ($wp_rewrite->index != $pathinfo) ) { $request = $pathinfo; } else { $request = $req_uri;