Changeset 2005


Ignore:
Timestamp:
May 8, 2007, 12:16:26 PM (17 years ago)
Author:
rub
Message:

Issue 0000619: bad result of cookie_path() function

I removed source code with PATH_INFO because this code generates problem on some environment and because I don't understand this utility (next substr extracts good value)

Manual merge BSF 2004-2004 into branch_1.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_7/include/functions_session.inc.php

    r1900 r2005  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
    6 // +-----------------------------------------------------------------------+
    7 // | branch        : BSF (Best So Far)
    8 // | file          : $RCSfile$
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     6// +-----------------------------------------------------------------------+
     7// | file          : $Id$
    98// | last update   : $Date$
    109// | last modifier : $Author$
     
    8887  }
    8988  else if ( isset($_SERVER['REDIRECT_URL']) )
    90   { // mod_rewrite is activated for upper level directories. we must set the
     89  {
     90    // mod_rewrite is activated for upper level directories. we must set the
    9191    // cookie to the path shown in the browser otherwise it will be discarded.
    92     if ( isset($_SERVER['PATH_INFO']) and !empty($_SERVER['PATH_INFO']) )
    93     {
    94       $idx = strpos( $_SERVER['REDIRECT_URL'], $_SERVER['PATH_INFO'] );
    95       if ($idx !== false)
    96       {
    97         $scr = substr($_SERVER['REDIRECT_URL'], 0, $idx);
    98       }
    99       else
    100       {//this should never happen
    101         $scr='//';
    102       }
    103     }
    104     else
    105     {
    106       $scr = $_SERVER['REDIRECT_URL'];
    107     }
     92    $scr = $_SERVER['REDIRECT_URL'];
    10893  }
    10994  else
     
    11196    $scr = $_SERVER['SCRIPT_NAME'];
    11297  }
     98
    11399  $scr = substr($scr,0,strrpos( $scr,'/'));
    114100
Note: See TracChangeset for help on using the changeset viewer.