diff --git a/cache/lastCache.txt b/cache/lastCache.txt index f48634d..930d02c 100644 --- a/cache/lastCache.txt +++ b/cache/lastCache.txt @@ -1 +1 @@ -1527151147 \ No newline at end of file +1527608103 \ No newline at end of file diff --git a/settings/settings.yaml.example b/settings/settings.yaml.example deleted file mode 100644 index 5bf82aa..0000000 --- a/settings/settings.yaml.example +++ /dev/null @@ -1,6 +0,0 @@ -title: MyWebsite -author: 'Your Name' -copyright: © -year: '2018' -theme: typemill -startpage: true \ No newline at end of file diff --git a/system/Controllers/AuthController.php b/system/Controllers/AuthController.php index 1c332fb..777b1ce 100644 --- a/system/Controllers/AuthController.php +++ b/system/Controllers/AuthController.php @@ -34,7 +34,7 @@ class AuthController extends Controller */ public function show(Request $request, Response $response, $args) - { + { $data = array(); /* check previous login attemps */ @@ -63,7 +63,7 @@ class AuthController extends Controller } } - $this->c->view->render($response, '/auth/login.twig', $data); + $this->render($response, '/auth/login.twig', $data); } /** diff --git a/system/Controllers/Controller.php b/system/Controllers/Controller.php index dc901f6..a0a6990 100644 --- a/system/Controllers/Controller.php +++ b/system/Controllers/Controller.php @@ -18,9 +18,17 @@ abstract class Controller protected function render($response, $route, $data) { $data = $this->c->dispatcher->dispatch('onPageReady', new OnPageReady($data))->getData(); - - unset($_SESSION['old']); + if(isset($_SESSION['old'])) + { + unset($_SESSION['old']); + } + + if($this->c->request->getUri()->getScheme() == 'https') + { + $response = $response->withAddedHeader('Strict-Transport-Security', 'max-age=63072000'); + } + $response = $response->withAddedHeader('X-Content-Type-Options', 'nosniff'); $response = $response->withAddedHeader('X-Frame-Options', 'SAMEORIGIN'); $response = $response->withAddedHeader('X-XSS-Protection', '1;mode=block'); diff --git a/system/author/settings/system.twig b/system/author/settings/system.twig index e70d23f..c3accb5 100644 --- a/system/author/settings/system.twig +++ b/system/author/settings/system.twig @@ -57,6 +57,9 @@ {% if errors.settings.language %} {{ errors.settings.language | first }} {% endif %} +
+ +
Startpage