From b6656e814163ca83eccb87e75cf5069367065283 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 1 Feb 2020 23:30:19 +0000 Subject: [PATCH] more privacy --- core/basepage.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/core/basepage.php b/core/basepage.php index 992f0708..95c5965b 100644 --- a/core/basepage.php +++ b/core/basepage.php @@ -49,7 +49,7 @@ class BasePage /** @var string */ public $mode = PageMode::PAGE; /** @var string */ - public $type = "text/html; charset=utf-8"; + private $type = "text/html; charset=utf-8"; /** * Set what this page should do; "page", "data", or "redirect". @@ -80,11 +80,11 @@ class BasePage /** @var string; public only for unit test */ public $data = ""; - /** @var string; */ - public $file = null; + /** @var string */ + private $file = null; - /** @var string; public only for unit test */ - public $filename = null; + /** @var string */ + private $filename = null; private $disposition = null; @@ -237,14 +237,6 @@ class BasePage return $data; } - /** - * Removes all currently set HTML headers (Be careful..). - */ - public function delete_all_html_headers(): void - { - $this->html_headers = []; - } - /** * Add a Block of data to the page. */ @@ -274,8 +266,6 @@ class BasePage */ public function display(): void { - global $user; - header("HTTP/1.0 {$this->code} Shimmie"); header("Content-type: " . $this->type); header("X-Powered-By: Shimmie-" . VERSION); @@ -294,6 +284,7 @@ class BasePage switch ($this->mode) { case PageMode::PAGE: if (CACHE_HTTP) { + global $user; header("Vary: Cookie, Accept-Encoding"); if ($user->is_anonymous() && $_SERVER["REQUEST_METHOD"] == "GET") { header("Cache-control: public, max-age=600");