Make WordPress Core

Changeset 3206


Ignore:
Timestamp:
11/23/2005 10:38:25 PM (20 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r3197 r3206  
    14441444            $req_uri = str_replace($home_path, '', $req_uri);
    14451445            $req_uri = trim($req_uri, '/');
     1446            $pathinfo = str_replace($home_path, '', $pathinfo);
    14461447            $pathinfo = trim($pathinfo, '/');
    14471448            $self = str_replace($home_path, '', $self);
     
    14501451            // The requested permalink is in $pathinfo for path info requests and
    14511452            //  $req_uri for other requests.
    1452             if (! empty($pathinfo) && ($wp_rewrite->index != $pathinfo)) {
     1453            if ( ! empty($pathinfo) && ($wp_rewrite->index != $pathinfo) ) {
    14531454                $request = $pathinfo;
    14541455            } else {
Note: See TracChangeset for help on using the changeset viewer.