Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@matomo.org>2020-02-24 11:18:50 +0300
committersgiehl <stefan@matomo.org>2020-02-24 11:18:50 +0300
commit31dcb9dbb01460bf9a68dc8b7bc826a05c367f74 (patch)
treee7dbaf14fb8cf8e34f421df53e22fc88b1b7b0c2 /core/Session.php
parent92e1b8bc5b8baa7683e4aa7a6abdd40064cd448b (diff)
parent7c517de3c74b8417230d813ae35e6b5eba06605e (diff)
Merge branch '3.x-dev' into 4.x-dev
Diffstat (limited to 'core/Session.php')
-rw-r--r--core/Session.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/core/Session.php b/core/Session.php
index d7ee14beb4..bed2df45bc 100644
--- a/core/Session.php
+++ b/core/Session.php
@@ -175,7 +175,15 @@ class Session extends Zend_Session
{
$config = Config::getInstance();
$general = $config->General;
- if (!empty($general['enable_framed_pages']) && ProxyHttp::isHttps()) {
+
+ $module = Piwik::getModule();
+ $action = Piwik::getAction();
+
+ $isOptOutRequest = $module == 'CoreAdminHome' && $action == 'optOut';
+ $isOverlay = $module == 'Overlay';
+ $shouldUseNone = !empty($general['enable_framed_pages']) || $isOptOutRequest || $isOverlay;
+
+ if ($shouldUseNone && ProxyHttp::isHttps()) {
return 'None';
}
@@ -199,10 +207,10 @@ class Session extends Zend_Session
{
$headerStr = 'Set-Cookie: ' . rawurlencode($name) . '=' . rawurlencode($value);
if ($expires) {
- $headerStr .= '; expires=' . rawurlencode($expires);
+ $headerStr .= '; expires=' . $expires;
}
if ($path) {
- $headerStr .= '; path=' . rawurlencode($path);
+ $headerStr .= '; path=' . $path;
}
if ($domain) {
$headerStr .= '; domain=' . rawurlencode($domain);
@@ -214,8 +222,10 @@ class Session extends Zend_Session
$headerStr .= '; httponly';
}
if ($sameSite) {
- $headerStr .= '; SameSite=' . rawurlencode($sameSite);
+ $headerStr .= '; SameSite=' . $sameSite;
}
+
+ Common::sendHeader($headerStr);
return $headerStr;
}
}