diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c44fb13d3..95eeda6d4 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -5,6 +5,11 @@ - Fixed the test skeleton - Fixed some bugs regarding Search relevance sorting (Len Kranendonk / www.ilance.nl) - Added an option to override the session cookie name. + - Added an option to override the session cookie domain. + - fix: Search results not showing synopses + - fix: Redirects get displayed inside page layouts as '0' + - fix: Mysterious "0" Appearing When Admin Is Off + - fix: Deletion of Products - Fix Asset.pm so that if no className is passed primeval Assets are not returned. diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index d28fe4446..3c2f57fe9 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -12,6 +12,12 @@ "cookieName" : "wgSession", +# Explicitly set the domain that the WebGUI session cookie +# should be assigned to. Defaults to the domain that the user +# is browsing the site under. + +# "cookieDomain" : ".example.com", + # The location where the WebGUI server will be handling # requests. This is normally just '/' or the root of the # server, but on some installations it might be /webgui or diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index f135663a1..01aa7ed76 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -112,7 +112,7 @@ sub contentHandler { } else { $output = page($session); } - $session->http->setCookie($session->config->getCookieName,$session->var->{_var}{sessionId}) unless $session->var->{_var}{sessionId} eq $session->http->getCookies->{$session->config->getCookieName}; + $session->http->setCookie($session->config->getCookieName,$session->var->getId, undef, $session->config->get("cookieDomain")) unless $session->var->getId eq $session->http->getCookies->{$session->config->getCookieName}; my $filename = $session->http->getStreamedFile(); if ((defined $filename) && ($session->config->get("enableStreamingUploads") eq "1")) { my $ct = guess_media_type($filename); diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index e52ef8f63..57e329f52 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -197,7 +197,7 @@ sub checkView { $self->logView(); # must find a way to do this next line better my $cookieName = $self->session->config->getCookieName; - $self->session->http->setCookie($cookieName,$self->session->var->{_var}{sessionId}) unless $self->session->var->{_var}{sessionId} eq $self->session->http->getCookies->{$cookieName}; + $self->session->http->setCookie($cookieName,$self->session->var->getId, undef, $self->session->config->get("cookieDomain")) unless $self->session->var->getId eq $self->session->http->getCookies->{$cookieName}; return undef; } @@ -1802,7 +1802,11 @@ Returns "". sub view { my $self = shift; - return $self->getToolbar if ($self->session->var->get("adminOn")); + if ($self->session->var->get("adminOn")) { + return $self->getToolbar; + } else { + return ""; + } } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Asset/Redirect.pm b/lib/WebGUI/Asset/Redirect.pm index 5e92bb429..1b4b2aae0 100644 --- a/lib/WebGUI/Asset/Redirect.pm +++ b/lib/WebGUI/Asset/Redirect.pm @@ -111,7 +111,10 @@ sub www_view {