Index: trunk/core/kernel/session/session.php =================================================================== diff -u -N -r2681 -r2785 --- trunk/core/kernel/session/session.php (.../session.php) (revision 2681) +++ trunk/core/kernel/session/session.php (.../session.php) (revision 2785) @@ -257,7 +257,7 @@ function SetCookieDomain($domain) { - $this->CookieDomain = $domain; + $this->CookieDomain = '.'.ltrim($domain, '.'); } function SetGETName($get_name) @@ -319,7 +319,7 @@ function CheckReferer() { $path = preg_replace("/admin$/", '', $this->CookiePath); // removing /admin for compatability with in-portal (in-link/admin/add_link.php) - $reg = '#^'.preg_quote(PROTOCOL.$this->CookieDomain.$path).'#'; + $reg = '#^'.preg_quote(PROTOCOL.ltrim($this->CookieDomain, '.').$path).'#'; return preg_match($reg, $_SERVER['HTTP_REFERER']) || (defined('IS_POPUP') && IS_POPUP); } Index: trunk/core/units/general/inp_ses_storage.php =================================================================== diff -u -N -r2784 -r2785 --- trunk/core/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 2784) +++ trunk/core/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 2785) @@ -22,8 +22,8 @@ if ($ses_mode == 1) $mode = smCOOKIES_ONLY; if ($ses_mode == 0) $mode = smGET_ONLY; if ( defined('ADMIN') && ADMIN ) $mode = smAUTO; - $this->SetMode( $mode ); - $this->SetCookieDomain( $this->Application->IsAdmin() ? SERVER_NAME : '.'.SERVER_NAME ); + $this->SetMode($mode); + $this->SetCookieDomain(SERVER_NAME); parent::Init($prefix,$special); if (!defined('ADMIN')) { Index: trunk/kernel/units/general/inp_ses_storage.php =================================================================== diff -u -N -r2784 -r2785 --- trunk/kernel/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 2784) +++ trunk/kernel/units/general/inp_ses_storage.php (.../inp_ses_storage.php) (revision 2785) @@ -22,8 +22,8 @@ if ($ses_mode == 1) $mode = smCOOKIES_ONLY; if ($ses_mode == 0) $mode = smGET_ONLY; if ( defined('ADMIN') && ADMIN ) $mode = smAUTO; - $this->SetMode( $mode ); - $this->SetCookieDomain( $this->Application->IsAdmin() ? SERVER_NAME : '.'.SERVER_NAME ); + $this->SetMode($mode); + $this->SetCookieDomain(SERVER_NAME); parent::Init($prefix,$special); if (!defined('ADMIN')) {