Changeset 2006


Ignore:
Timestamp:
May 11, 2007, 10:07:47 PM (17 years ago)
Author:
rub
Message:

Issue 0000619: bad result of cookie_path() function

After discussion with Radu of an other case, PATH_INFO is re-introduce with news conditions.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        33feed.xml
        44testmail
         5phpmv2
  • trunk/include/functions_cookie.inc.php

    r2004 r2006  
    4040    // mod_rewrite is activated for upper level directories. we must set the
    4141    // cookie to the path shown in the browser otherwise it will be discarded.
    42     $scr = $_SERVER['REDIRECT_URL'];
     42    if
     43      (
     44        isset($_SERVER['PATH_INFO']) and !empty($_SERVER['PATH_INFO']) and
     45        ($_SERVER['REDIRECT_URL'] !== $_SERVER['PATH_INFO']) and
     46        (substr($_SERVER['REDIRECT_URL'],-strlen($_SERVER['PATH_INFO']))
     47            == $_SERVER['PATH_INFO'])
     48      )
     49    {
     50      $scr = substr($_SERVER['REDIRECT_URL'], 0,
     51        strlen($_SERVER['REDIRECT_URL'])-strlen($_SERVER['PATH_INFO']));
     52    }
     53    else
     54    {
     55      $scr = $_SERVER['REDIRECT_URL'];
     56    }
    4357  }
    4458  else
  • trunk/plugins

    • Property svn:ignore
      •  

        old new  
        11text_integrator
         2phpmv
  • trunk/template/yoga/theme

    • Property svn:ignore
      •  

        old new  
        1111hk-darkblue-left
        1212minimalus
         13exftb
Note: See TracChangeset for help on using the changeset viewer.